Installscript: Use POSIX-compliant sh instead of bash
This commit is contained in:
parent
29ae56d87a
commit
062dbcda9a
1 changed files with 10 additions and 10 deletions
20
install.sh
20
install.sh
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
while [[ "$1" ]]; do
|
while [ "$1" ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"--destdir") DESTDIR="$2" ;;
|
"--destdir") DESTDIR="$2" ;;
|
||||||
"--bindir") BINDIR="$2" ;;
|
"--bindir") BINDIR="$2" ;;
|
||||||
|
@ -12,16 +12,16 @@ while [[ "$1" ]]; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -z "$PREFIX" ]]; then
|
if [ -z "$PREFIX" ]; then
|
||||||
[[ -z "$BINDIR" ]] && BINDIR="/usr/bin"
|
[ -z "$BINDIR" ] && BINDIR="/usr/bin"
|
||||||
[[ -z "$ASCIIDIR" ]] && ASCIIDIR="/usr/share/neofetch/ascii/distro"
|
[ -z "$ASCIIDIR" ] && ASCIIDIR="/usr/share/neofetch/ascii/distro"
|
||||||
[[ -z "$MANDIR" ]] && MANDIR="/usr/share/man/man1"
|
[ -z "$MANDIR" ] && MANDIR="/usr/share/man/man1"
|
||||||
else
|
else
|
||||||
[[ -z "$BINDIR" ]] && BINDIR="/bin"
|
[ -z "$BINDIR" ] && BINDIR="/bin"
|
||||||
[[ -z "$ASCIIDIR" ]] && ASCIIDIR="/share/neofetch/ascii/distro"
|
[ -z "$ASCIIDIR" ] && ASCIIDIR="/share/neofetch/ascii/distro"
|
||||||
[[ -z "$MANDIR" ]] && MANDIR="/share/man/man1"
|
[ -z "$MANDIR" ] && MANDIR="/share/man/man1"
|
||||||
fi
|
fi
|
||||||
[[ -z "$CONFDIR" ]] && CONFDIR="/etc/neofetch"
|
[ -z "$CONFDIR" ] && CONFDIR="/etc/neofetch"
|
||||||
|
|
||||||
mkdir -p "${DESTDIR}""${PREFIX}""${BINDIR}"
|
mkdir -p "${DESTDIR}""${PREFIX}""${BINDIR}"
|
||||||
mkdir -p "${DESTDIR}""${PREFIX}""${CONFDIR}"
|
mkdir -p "${DESTDIR}""${PREFIX}""${CONFDIR}"
|
||||||
|
|
Loading…
Reference in a new issue