mirror of
https://github.com/helixarch/debtap
synced 2024-12-22 13:35:13 +01:00
Update
This commit is contained in:
parent
914978fb09
commit
b6fac5175b
14
debtap
14
debtap
|
@ -28,6 +28,7 @@ elif [[ "$1" == "-u" ]] || [[ "$1" = "--u" ]] || [[ "$1" == "-update" ]] || [[ "
|
|||
echo -e "${red}Error: You must run this command with root privileges${NC}"; exit 1
|
||||
else
|
||||
mkdir -p /var/cache/debtap 2> /dev/null
|
||||
chmod 755 /var/cache/debtap
|
||||
echo -e "${lightgreen}==>${NC} ${bold}Synchronizing pkgfile database...${normal}"
|
||||
pkgfile -u
|
||||
if [[ $(echo $?) != 0 ]]; then
|
||||
|
@ -53,6 +54,7 @@ elif [[ "$1" == "-u" ]] || [[ "$1" = "--u" ]] || [[ "$1" == "-update" ]] || [[ "
|
|||
if [[ $(echo $?) != 0 ]]; then
|
||||
echo -e "${red}Downloading failed. Exiting...${NC}"; exit 1
|
||||
else
|
||||
chmod 644 /var/cache/debtap/*
|
||||
echo -e "${lightgreen}==>${NC} ${bold}All steps successfully completed!${normal}"; exit 0
|
||||
fi
|
||||
fi
|
||||
|
@ -3515,7 +3517,7 @@ if [ -e preinst ] || [ -e postinst ] || [ -e prerm ] || [ -e postrm ]; then
|
|||
IFS=$'\n'
|
||||
if [ -e preinst ] && [ -e postinst ]; then
|
||||
echo "pre_install() {" > tempfile
|
||||
grep -iv '#!\|automatically\|added\|generated' preinst | while read line; do
|
||||
grep -iv '#!\|automatically\|added\|generated' preinst | while read -r line; do
|
||||
echo " $line" | sed s'/ / /g' >> tempfile
|
||||
done
|
||||
echo "}" >> tempfile
|
||||
|
@ -3525,7 +3527,7 @@ if [ -e preinst ] || [ -e postinst ] || [ -e prerm ] || [ -e postrm ]; then
|
|||
elif [ $(grep '^depend' .PKGINFO | grep -q gtk; echo $?) -eq 0 ]; then
|
||||
echo ' gtk-update-icon-cache -q -t -f usr/share/icons/hicolor' >> tempfile
|
||||
fi
|
||||
grep -iv '#!\|automatically\|added\|generated' postinst | while read line; do
|
||||
grep -iv '#!\|automatically\|added\|generated' postinst | while read -r line; do
|
||||
echo " $line" | sed s'/ / /g' >> tempfile
|
||||
done
|
||||
if [ $(grep '^depend' .PKGINFO | grep -q 'qt\|gtk'; echo $?) -eq 0 ]; then
|
||||
|
@ -3540,7 +3542,7 @@ if [ -e preinst ] || [ -e postinst ] || [ -e prerm ] || [ -e postrm ]; then
|
|||
echo "}" >> tempfile
|
||||
elif [ -e preinst ] && [ ! -e postinst ]; then
|
||||
echo "pre_install() {" > tempfile
|
||||
grep -iv '#!\|automatically\|added\|generated' preinst | while read line; do
|
||||
grep -iv '#!\|automatically\|added\|generated' preinst | while read -r line; do
|
||||
echo " $line" | sed s'/ / /g' >> tempfile
|
||||
done
|
||||
echo "}" >> tempfile
|
||||
|
@ -3554,7 +3556,7 @@ if [ -e preinst ] || [ -e postinst ] || [ -e prerm ] || [ -e postrm ]; then
|
|||
elif [ $(grep '^depend' .PKGINFO | grep -q gtk; echo $?) -eq 0 ]; then
|
||||
echo ' gtk-update-icon-cache -q -t -f usr/share/icons/hicolor' >> tempfile
|
||||
fi
|
||||
grep -iv '#!\|automatically\|added\|generated' postinst | while read line; do
|
||||
grep -iv '#!\|automatically\|added\|generated' postinst | while read -r line; do
|
||||
echo " $line" | sed s'/ / /g' >> tempfile
|
||||
done
|
||||
if [ $(grep '^depend' .PKGINFO | grep -q 'qt\|gtk'; echo $?) -eq 0 ]; then
|
||||
|
@ -3568,7 +3570,7 @@ if [ -e preinst ] || [ -e postinst ] || [ -e prerm ] || [ -e postrm ]; then
|
|||
|
||||
if [ -e prerm ]; then
|
||||
echo -e "\npre_remove() {" >> tempfile
|
||||
grep -iv '#!\|automatically\|added\|generated' prerm | while read line; do
|
||||
grep -iv '#!\|automatically\|added\|generated' prerm | while read -r line; do
|
||||
echo " $line" | sed s'/ / /g' >> tempfile
|
||||
done
|
||||
echo "}" >> tempfile
|
||||
|
@ -3581,7 +3583,7 @@ if [ -e preinst ] || [ -e postinst ] || [ -e prerm ] || [ -e postrm ]; then
|
|||
elif [ $(grep '^depend' .PKGINFO | grep -q gtk; echo $?) -eq 0 ]; then
|
||||
echo ' gtk-update-icon-cache -q -t -f usr/share/icons/hicolor' >> tempfile
|
||||
fi
|
||||
grep -iv '#!\|automatically\|added\|generated' postrm | while read line; do
|
||||
grep -iv '#!\|automatically\|added\|generated' postrm | while read -r line; do
|
||||
echo " $line" | sed s'/ / /g' >> tempfile
|
||||
done
|
||||
if [ $(grep '^depend' .PKGINFO | grep -q 'qt\|gtk'; echo $?) -eq 0 ]; then
|
||||
|
|
Loading…
Reference in New Issue
Block a user