diff --git a/package_creators/arch.sh b/package_creators/arch.sh index d19eaa21..4b927f5e 100755 --- a/package_creators/arch.sh +++ b/package_creators/arch.sh @@ -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 diff --git a/package_creators/tarball.sh b/package_creators/tarball.sh index e949911b..113ce340 100755 --- a/package_creators/tarball.sh +++ b/package_creators/tarball.sh @@ -27,4 +27,4 @@ rm -rf config.log rm -rf aclocal.m4 rm -rf build-conf rm -rf autom4te.cache -cd package_creators \ No newline at end of file +cd package_creators