Misc: Different behaviors if PREFIX is empty

This commit is contained in:
Muhammad Herdiansyah 2017-06-20 18:28:19 +07:00
parent 96103a757f
commit 8665cbb4eb
1 changed files with 9 additions and 3 deletions

View File

@ -12,10 +12,16 @@ while [[ "$1" ]]; do
shift
done
if [[ -z "$PREFIX" ]]; then
[[ -z "$BINDIR" ]] && BINDIR="/usr/bin"
[[ -z "$CONFDIR" ]] && CONFDIR="/etc/neofetch"
[[ -z "$ASCIIDIR" ]] && ASCIIDIR="/usr/share/neofetch/ascii/distro"
[[ -z "$MANDIR" ]] && MANDIR="/usr/share/man/man1"
else
[[ -z "$BINDIR" ]] && BINDIR="/bin"
[[ -z "$ASCIIDIR" ]] && ASCIIDIR="/share/neofetch/ascii/distro"
[[ -z "$MANDIR" ]] && MANDIR="/share/man/man1"
fi
[[ -z "$CONFDIR" ]] && CONFDIR="/etc/neofetch"
mkdir -p "${DESTDIR}""${PREFIX}""${BINDIR}"
mkdir -p "${DESTDIR}""${PREFIX}""${CONFDIR}"