mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Refactor init_deps.sh to simplify post-install script execution logic
This commit is contained in:
parent
2146e20608
commit
8d27236b1a
1 changed files with 1 additions and 3 deletions
|
|
@ -43,13 +43,11 @@ do
|
|||
url="$(echo "$repo" | jq -r .url)"
|
||||
commit="$(echo "$repo" | jq -r .commit)"
|
||||
post_install="$(echo "$repo" | jq -r .post_install)"
|
||||
post="no"
|
||||
|
||||
echo "ℹ️ Clone ${name} from $url at commit/version $commit"
|
||||
|
||||
if [ ! -d "src/deps/src/$id" ] ; then
|
||||
do_and_check_cmd git subtree add --prefix "src/deps/src/$id" "$url" "$commit" --squash
|
||||
post="yes"
|
||||
else
|
||||
echo "⚠️ Skipping clone of $url because target directory is already present"
|
||||
echo "ℹ️ Updating ${name} from $url at commit/version $commit"
|
||||
|
|
@ -60,7 +58,7 @@ do
|
|||
do_and_check_cmd rm -rf "src/deps/src/$id/.git"
|
||||
fi
|
||||
|
||||
if [ "$post_install" != "null" ] && [ "$post" != "no" ]; then
|
||||
if [ "$post_install" != "null" ]; then
|
||||
echo "ℹ️ Running post install script for ${name}"
|
||||
bash -c "$post_install"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue