Skip to content

Commit ab75044

Browse files
committed
Use a for loop
1 parent 67f0dda commit ab75044

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

scripts/update-built-docs.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ copyBuildSources() {
99
rm -v ./api-docs/*.php
1010
# Remove index file
1111
rm -v ./api-docs/index.html
12+
1213
# Restore from main branch
13-
git ls-tree -r --name-only main | grep -F -- ".github/api-docs" | xargs git checkout main --
14+
for file in $(git ls-tree -r --name-only main | grep -F -- ".github/api-docs"); do
15+
echo "Copying: $file";
16+
git checkout main -- $file
17+
done
18+
1419
# Restore files
1520
mv -v .github/api-docs/*.php ./api-docs/
1621
mv -v .github/api-docs/index.html ./api-docs/

0 commit comments

Comments
 (0)