Skip to content

Commit 31206a1

Browse files
committed
Cleaner file move
1 parent 01b3ea9 commit 31206a1

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

extra/buildall.sh

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ if [[ -d rp/.git ]]; then
2121
else
2222
# Clean up any existing symlink or non-git directory
2323
rm -rf rp
24-
git-clone-dir "$RP_REPO_URL" rp "$RP_HEADERS_PATH"
25-
# Move headers to correct location
26-
mv "rp/$RP_HEADERS_PATH"/* rp/
27-
rm -rf rp/scripts_src
24+
rm -rf tmp
25+
git-clone-dir "$RP_REPO_URL" tmp "$RP_HEADERS_PATH"
26+
# Move the headers directory
27+
mv tmp/"$RP_HEADERS_PATH" rp
28+
rm -rf tmp
2829
fi
2930

3031
# Party Orders headers
@@ -35,10 +36,11 @@ if [[ -d party_orders/.git ]]; then
3536
else
3637
# Clean up any existing symlink or non-git directory
3738
rm -rf party_orders
38-
git-clone-dir "$PARTY_ORDERS_REPO_URL" party_orders "$PARTY_ORDERS_HEADERS_PATH"
39-
# Move headers to correct location
40-
mv "party_orders/$PARTY_ORDERS_HEADERS_PATH"/* party_orders/
41-
rm -rf party_orders/source
39+
rm -rf tmp
40+
git-clone-dir "$PARTY_ORDERS_REPO_URL" tmp "$PARTY_ORDERS_HEADERS_PATH"
41+
# Move the headers directory
42+
mv tmp/"$PARTY_ORDERS_HEADERS_PATH" party_orders
43+
rm -rf tmp
4244
fi
4345

4446
# Sfall headers
@@ -49,10 +51,11 @@ if [[ -d sfall/.git ]]; then
4951
else
5052
# Clean up any existing symlink or non-git directory
5153
rm -rf sfall
52-
git-clone-dir "$SFALL_REPO_URL" sfall "$SFALL_HEADERS_PATH"
53-
# Move headers to correct location
54-
mv "sfall/$SFALL_HEADERS_PATH"/* sfall/
55-
rm -rf sfall/artifacts
54+
rm -rf tmp
55+
git-clone-dir "$SFALL_REPO_URL" tmp "$SFALL_HEADERS_PATH"
56+
# Move the headers directory
57+
mv tmp/"$SFALL_HEADERS_PATH" sfall
58+
rm -rf tmp
5659
fi
5760

5861
cd ../..

0 commit comments

Comments
 (0)