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
|
./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 -g >> PKGBUILD
|
||||||
makepkg -sc
|
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
|
rm -f ./*.tar.gz
|
||||||
sed -i '$ d' PKGBUILD
|
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
|
case $yn in
|
||||||
[Nn]* ) exit;;
|
[Yy]* ) su -c "pacman -U ./*.pkg.tar.xz"; rm -f ./*.pkg.tar.xz;;
|
||||||
* ) sudo pacman -U ./*.pkg.tar.xz; rm -f ./*.pkg.tar.xz;;
|
* ) exit;;
|
||||||
esac
|
esac
|
||||||
|
@ -27,4 +27,4 @@ rm -rf config.log
|
|||||||
rm -rf aclocal.m4
|
rm -rf aclocal.m4
|
||||||
rm -rf build-conf
|
rm -rf build-conf
|
||||||
rm -rf autom4te.cache
|
rm -rf autom4te.cache
|
||||||
cd package_creators
|
cd package_creators
|
||||||
|
Loading…
Reference in New Issue
Block a user