ccextractor/package_creators/arch.sh

26 lines
653 B
Bash
Raw Normal View History

#!/bin/bash
2017-03-29 14:22:22 +00:00
./tarball.sh
retval=$?
if [ $retval -ne 0 ]; then
echo "Sorry, the package could not be created as the tarball building process failed with return code $retval"
rm -f ./*.tar.gz
exit $retval
fi
2017-03-29 14:22:22 +00:00
makepkg -g >> PKGBUILD
makepkg -sc
retval=$?
if [ $retval -ne 0 ]; then
2017-04-10 06:20:57 +00:00
echo "Sorry, the package could not be created as makepkg failed with return code $retval"
rm -rf ./*.tar.gz src
sed -i '$ d' PKGBUILD
exit $retval
fi
rm -f ./*.tar.gz
2017-03-29 14:22:22 +00:00
sed -i '$ d' PKGBUILD
read -p "Do you wish to install ccextractor? [y/N] " yn
case $yn in
[Yy]* ) su -c "pacman -U ./*.pkg.tar.xz"; rm -f ./*.pkg.tar.xz;;
* ) exit;;
esac