diff options
| author | boppyt <71049646+boppyt@users.noreply.github.com> | 2021-08-28 23:31:49 -0700 |
|---|---|---|
| committer | Francesco <francesco.bbt@gmail.com> | 2021-08-30 09:15:44 +0200 |
| commit | 3b35c86c9681245c0a4f597a9e77a4748b68b0f3 (patch) | |
| tree | ed7ef01974295d7d590a2e5a524b1adddc674d65 | |
| parent | 08e4e5275fff53b297633126d100dff5d62a9a92 (diff) | |
| download | lite-xl-3b35c86c9681245c0a4f597a9e77a4748b68b0f3.tar.gz lite-xl-3b35c86c9681245c0a4f597a9e77a4748b68b0f3.zip | |
build script: check for BUILD_PROHIBIT_GIT
| -rwxr-xr-x | build-packages.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build-packages.sh b/build-packages.sh index 039e56f8..366882e6 100755 --- a/build-packages.sh +++ b/build-packages.sh @@ -14,7 +14,7 @@ copy_directory_from_repo () { } _archive () { - if [[ -d ".git" ]]; then + if [[ -d ".git" || $BUILD_PROHIBIT_GIT -eq 1 ]]; then git archive "$1" "$2" --format=tar | tar xf - -C "$3" "$4" else echo ".git not found, falling back to UNIX operation" @@ -29,7 +29,7 @@ build_dir_is_usable () { echo "invalid build directory, no path allowed: \"$build\"" return 1 fi - if [[ -d ".git" ]]; then + if [[ -d ".git" || $BUILD_PROHIBIT_GIT -eq 1 ]]; then git ls-files --error-unmatch "$build" &> /dev/null if [ $? == 0 ]; then echo "invalid path, \"$build\" is under revision control" @@ -227,7 +227,7 @@ if [ -z ${arch+set} ]; then fi if [ -z ${use_branch+set} ]; then - if [[ -d ".git" ]]; then + if [[ -d ".git" || $BUILD_PROHIBIT_GIT -eq 1 ]]; then use_branch="$(git rev-parse --abbrev-ref HEAD)" else # it really doesn't matter if git isn't present |
