Skip to content

Commit de74f55

Browse files
committed
Fix bug where script doesn’t run on Bash
Apparently, an empty `if […] then; else` works fine on FreeBSD sh, but errors out on Bash. What the hell?
1 parent dfbc3bd commit de74f55

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

phreaknet.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,8 @@ if [ "$PAC_MAN" = "pacman" ]; then
455455
if ! which "hostname" > /dev/null; then
456456
install_package "net-tools"
457457
fi
458-
elif [ "$PAC_MAN" = "pkg" ]; then
459-
# `hostname' is part of base; do not install
460-
else
458+
elif [ "$PAC_MAN" != "pkg" ]; then
459+
# `hostname' is part of base on FreeBSD; do not install
461460
ensure_installed "hostname"
462461
fi
463462

0 commit comments

Comments
 (0)