KShare/packages/makedeb.sh

26 lines
468 B
Bash
Raw Normal View History

2017-06-25 14:41:48 +02:00
#!/usr/bin/env bash
if [[ "$1" == "" ]]
then
echo "Provide a version with arg1" >&2
exit 1
fi
2017-06-25 23:31:56 +02:00
[[ ! -d work ]] && cp ubuntu17.04 work -r
2017-06-25 14:41:48 +02:00
sed "s/%ver/$1/g" ubuntu17.04/DEBIAN/control > work/DEBIAN/control
mkdir -p work/usr/bin
mkdir compiling
cd compiling
qmake ../../KShare.pro
if make
then
cd ..
cp compiling/KShare work/usr/bin/kshare
else
rm -rf compiling
echo "Failed to make!"
exit 2
fi
cd work
md5sum usr/bin/kshare > DEBIAN/md5sums
cd ..
2017-06-25 23:20:57 +02:00
dpkg-deb -b work/