summaryrefslogtreecommitdiff
path: root/tools/packages/debian.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/packages/debian.sh')
-rwxr-xr-xtools/packages/debian.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/packages/debian.sh b/tools/packages/debian.sh
index 58d02602..d4c1e5d9 100755
--- a/tools/packages/debian.sh
+++ b/tools/packages/debian.sh
@@ -1,21 +1,20 @@
-#!/bin/sh
+#!/bin/bash
PWD=`pwd`
VERSION=`cat PORTABLE_VERSION | perl -ne 'chomp and print'`
DEB_VERSION=`cat PORTABLE_VERSION | perl -ne 'chomp and print' | sed 's/-/~/'`
BUILD=`cat PORTABLE_BUILD | perl -ne 'chomp and print'`
-ARCH=`uname -m | perl -ne 'chomp and print'`
-INDIR=$PWD/static/$ARCH/deadbeef-$VERSION
-TEMPDIR=$PWD/package_temp/$ARCH/debian-$VERSION
-OUTDIR=$PWD/package_out/$ARCH/debian
-
-if [ "$ARCH" = "i686" ] ; then
+if [[ "$ARCH" == "i686" ]]; then
DEB_ARCH=i386
-elif [ "$ARCH" = "x86_64" ] ; then
+elif [[ "$ARCH" == "x86_64" ]]; then
DEB_ARCH=amd64
else
- DEB_ARCH=unknown
+ echo unknown arch $ARCH
+ exit -1
fi
+INDIR=$PWD/static/$ARCH/deadbeef-$VERSION
+TEMPDIR=$PWD/package_temp/$ARCH/debian-$VERSION
+OUTDIR=$PWD/package_out/$ARCH/debian
# make dirs
rm -rf $TEMPDIR