2017-04-10 06:16:15 +00:00
|
|
|
#!/bin/bash
|
2017-03-29 14:22:22 +00:00
|
|
|
|
|
|
|
./tarball.sh
|
2017-04-10 06:16:15 +00:00
|
|
|
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
|
2017-03-30 05:55:41 +00:00
|
|
|
makepkg -sc
|
2017-04-10 06:16:15 +00:00
|
|
|
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"
|
2017-04-10 06:16:15 +00:00
|
|
|
rm -rf ./*.tar.gz src
|
|
|
|
sed -i '$ d' PKGBUILD
|
|
|
|
exit $retval
|
|
|
|
fi
|
2017-03-30 05:55:41 +00:00
|
|
|
rm -f ./*.tar.gz
|
2017-03-29 14:22:22 +00:00
|
|
|
sed -i '$ d' PKGBUILD
|
2017-04-10 06:16:15 +00:00
|
|
|
read -p "Do you wish to install ccextractor? [y/N] " yn
|
2017-03-30 05:55:41 +00:00
|
|
|
case $yn in
|
2017-04-10 06:16:15 +00:00
|
|
|
[Yy]* ) su -c "pacman -U ./*.pkg.tar.xz"; rm -f ./*.pkg.tar.xz;;
|
|
|
|
* ) exit;;
|
2017-03-30 05:55:41 +00:00
|
|
|
esac
|