diff options
| author | Francesco Abbate <francesco.bbt@gmail.com> | 2022-04-20 14:41:31 +0200 |
|---|---|---|
| committer | Francesco Abbate <francesco.bbt@gmail.com> | 2022-04-20 14:41:31 +0200 |
| commit | 6140dbee5aa8528d82a597dd128c071dd1b95e0c (patch) | |
| tree | c737cbbb8144764ab98a03d21421e42a816f1166 | |
| parent | 3bb013450bef0aafef5a15e91eee8c5e32c30273 (diff) | |
| download | lite-xl-6140dbee5aa8528d82a597dd128c071dd1b95e0c.tar.gz lite-xl-6140dbee5aa8528d82a597dd128c071dd1b95e0c.zip | |
Use CPU_TYPE variable for arch if available
The variable is now defined by lhelper.
| -rw-r--r-- | scripts/appimage.sh | 2 | ||||
| -rw-r--r-- | scripts/common.sh | 10 | ||||
| -rw-r--r-- | scripts/package.sh | 2 | ||||
| -rw-r--r-- | scripts/repackage-appimage.sh | 4 |
4 files changed, 14 insertions, 4 deletions
diff --git a/scripts/appimage.sh b/scripts/appimage.sh index dc28c5e3..127c3608 100644 --- a/scripts/appimage.sh +++ b/scripts/appimage.sh @@ -24,7 +24,7 @@ show_help(){ echo } -ARCH="$(uname -m)" +ARCH="$(get_arch)" BUILD_DIR="$(get_default_build_dir)" RUN_BUILD=true STATIC_BUILD=false diff --git a/scripts/common.sh b/scripts/common.sh index 2b49d362..8b3ff5fd 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -14,9 +14,17 @@ get_platform_name() { fi } +get_arch () { + if [ -z ${CPU_TYPE+x} ]; then + uname -m + else + echo "$CPU_TYPE" + fi +} + get_default_build_dir() { platform=$(get_platform_name) - echo "build-$platform-$(uname -m)" + echo "build-$platform-$(get_arch)" } if [[ $(get_platform_name) == "UNSUPPORTED-OS" ]]; then diff --git a/scripts/package.sh b/scripts/package.sh index 64bee032..1338688b 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -85,7 +85,7 @@ source_package() { } main() { - local arch="$(uname -m)" + local arch="$(get_arch)" local platform="$(get_platform_name)" local build_dir="$(get_default_build_dir)" local dest_dir=lite-xl diff --git a/scripts/repackage-appimage.sh b/scripts/repackage-appimage.sh index b21cdfa0..9221c73e 100644 --- a/scripts/repackage-appimage.sh +++ b/scripts/repackage-appimage.sh @@ -1,12 +1,14 @@ #!/bin/env bash set -e +source scripts/common.sh + wget="wget --retry-connrefused --waitretry=1 --read-timeout=20 --no-check-certificate" workdir=".repackage" rm -fr "$workdir" && mkdir "$workdir" && pushd "$workdir" -ARCH="x86_64" +ARCH="$(get_arch)" create_appimage() { rm -fr LiteXL.AppDir |
