diff options
Diffstat (limited to 'development/visual-studio-code/visual-studio-code.SlackBuild')
-rw-r--r-- | development/visual-studio-code/visual-studio-code.SlackBuild | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/development/visual-studio-code/visual-studio-code.SlackBuild b/development/visual-studio-code/visual-studio-code.SlackBuild index f1ed3786c7..26e99e1b5b 100644 --- a/development/visual-studio-code/visual-studio-code.SlackBuild +++ b/development/visual-studio-code/visual-studio-code.SlackBuild @@ -27,32 +27,36 @@ VERSION=${VERSION:-0.9.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i486 ;; - *) ARCH=$( uname -m ) ;; - esac -fi +ARCH=${ARCH:-$(uname -m)} +case "$ARCH" in + i?86) + ARCH=i486 + SRCNAM=VSCode-linux32.zip + SRCDIR=VSCode-linux-ia32 + ;; + x86_64) + SRCNAM=VSCode-linux64.zip + SRCDIR=VSCode-linux-x64 + ;; + *) + echo "$ARCH is not supported" + exit 1 + ;; +esac CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "x86_64" ]; then - PKGSUFFIX=64 -else - PKGSUFFIX=32 -fi - set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf VSCode-linux-x${PKGSUFFIX} -unzip $CWD/VSCode-linux$PKGSUFFIX.zip -cd VSCode-linux-x${PKGSUFFIX} +rm -rf $SRCDIR +unzip $CWD/$SRCNAM +cd $SRCDIR chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ |