mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-07-28 19:58:47 +00:00
feat: finished editable profiles; profile prop to pull or not on build; profile props to set alternate component repos
This commit is contained in:
parent
371f874e3b
commit
5382ff92d2
21 changed files with 418 additions and 112 deletions
|
@ -6,9 +6,10 @@ set -ev
|
|||
|
||||
GIT_URL=$1
|
||||
REPO_DIR=$2
|
||||
DO_PULL=$3
|
||||
|
||||
_usage() {
|
||||
echo "Usage: $0 GIT_URL REPO_DIR"
|
||||
echo "Usage: $0 GIT_URL REPO_DIR [DO_PULL]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -20,12 +21,19 @@ if [[ -z $GIT_URL ]]; then
|
|||
_usage
|
||||
fi
|
||||
|
||||
if [[ -z $DO_PULL ]]; then
|
||||
DO_PULL=1
|
||||
fi
|
||||
|
||||
if [[ -d "$REPO_DIR" ]]; then
|
||||
if [[ ! -d "$REPO_DIR/.git" ]]; then
|
||||
echo "Error: $REPO_DIR exists but is not a git repository"
|
||||
exit 1
|
||||
rmdir "$REPO_DIR"
|
||||
git clone "$GIT_URL" "$REPO_DIR" --recurse-submodules
|
||||
else
|
||||
if [[ "$DO_PULL" -eq 1 ]]; then
|
||||
git -C "$REPO_DIR" pull
|
||||
fi
|
||||
fi
|
||||
git -C "$REPO_DIR" pull
|
||||
else
|
||||
git clone "$GIT_URL" "$REPO_DIR" --recurse-submodules
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue