Skip to content

Commit c95fddd

Browse files
authored
some extra checks that i forgot to add lmao
1 parent f8d7fbe commit c95fddd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fpkg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ error () {
1111

1212
write_check () {
1313
touch $FPKGDIR > /dev/null 2>&1
14+
ret=$((ret + $?))
15+
touch $FPKGDIR/pkg.list > /dev/null 2>&1
16+
ret=$((ret + $?))
17+
touch $FPKGDIR/ii > /dev/null 2>&1
18+
ret=$((ret + $?))
1419

15-
if [[ $? != 0 ]]; then
20+
if [[ $ret > 0 ]]; then
1621
echo "ERROR: you cannot write to $FPKGDIR! Please run as root"
1722
error
1823
fi

0 commit comments

Comments
 (0)