mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-23 11:27:38 +00:00
Use bash as shell; su instead of sudo; don't proceed if a command fails; change default to not installing
This commit is contained in:
parent
90f94d6053
commit
96ca325a25
@ -1,12 +1,25 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
./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
|
||||
makepkg -g >> PKGBUILD
|
||||
makepkg -sc
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
echo "Sorry, the package could not be created as the makepkg failed with return code $retval"
|
||||
rm -rf ./*.tar.gz src
|
||||
sed -i '$ d' PKGBUILD
|
||||
exit $retval
|
||||
fi
|
||||
rm -f ./*.tar.gz
|
||||
sed -i '$ d' PKGBUILD
|
||||
read -p "Do you wish to install ccextractor? [Y/n] " yn
|
||||
read -p "Do you wish to install ccextractor? [y/N] " yn
|
||||
case $yn in
|
||||
[Nn]* ) exit;;
|
||||
* ) sudo pacman -U ./*.pkg.tar.xz; rm -f ./*.pkg.tar.xz;;
|
||||
[Yy]* ) su -c "pacman -U ./*.pkg.tar.xz"; rm -f ./*.pkg.tar.xz;;
|
||||
* ) exit;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user