2017-06-24 17:44:55 +01:00
|
|
|
#!/bin/sh
|
2017-06-20 09:14:45 +01:00
|
|
|
|
2017-06-24 17:44:55 +01:00
|
|
|
while [ "$1" ]; do
|
2017-06-20 09:14:45 +01:00
|
|
|
case "$1" in
|
|
|
|
"--destdir") DESTDIR="$2" ;;
|
|
|
|
"--bindir") BINDIR="$2" ;;
|
|
|
|
"--confdir") CONFDIR="$2" ;;
|
|
|
|
"--prefix") PREFIX="$2" ;;
|
|
|
|
"--asciidir") ASCIIDIR="$2" ;;
|
|
|
|
"--mandir") MANDIR="$2" ;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
2017-06-24 17:44:55 +01:00
|
|
|
if [ -z "$PREFIX" ]; then
|
|
|
|
[ -z "$BINDIR" ] && BINDIR="/usr/bin"
|
|
|
|
[ -z "$ASCIIDIR" ] && ASCIIDIR="/usr/share/neofetch/ascii/distro"
|
|
|
|
[ -z "$MANDIR" ] && MANDIR="/usr/share/man/man1"
|
2017-06-20 12:28:19 +01:00
|
|
|
else
|
2017-06-24 17:44:55 +01:00
|
|
|
[ -z "$BINDIR" ] && BINDIR="/bin"
|
|
|
|
[ -z "$ASCIIDIR" ] && ASCIIDIR="/share/neofetch/ascii/distro"
|
|
|
|
[ -z "$MANDIR" ] && MANDIR="/share/man/man1"
|
2017-06-20 12:28:19 +01:00
|
|
|
fi
|
2017-06-24 17:44:55 +01:00
|
|
|
[ -z "$CONFDIR" ] && CONFDIR="/etc/neofetch"
|
2017-06-20 09:14:45 +01:00
|
|
|
|
|
|
|
mkdir -p "${DESTDIR}""${PREFIX}""${BINDIR}"
|
|
|
|
mkdir -p "${DESTDIR}""${PREFIX}""${CONFDIR}"
|
|
|
|
mkdir -p "${DESTDIR}""${PREFIX}""${ASCIIDIR}"
|
|
|
|
mkdir -p "${DESTDIR}""${PREFIX}""${MANDIR}"
|
|
|
|
|
2017-06-20 12:39:35 +01:00
|
|
|
sed -i -e "s|CONFDIR|${PREFIX}${CONFDIR}|g" neofetch
|
|
|
|
sed -i -e "s|ASCIIDIR|${PREFIX}${ASCIIDIR}|g" neofetch
|
2017-06-20 09:14:45 +01:00
|
|
|
|
|
|
|
cp -p neofetch "${DESTDIR}""${PREFIX}""${BINDIR}"
|
2017-07-01 11:19:38 +01:00
|
|
|
cp -p config/config.conf "${DESTDIR}""${PREFIX}""${CONFDIR}"
|
2017-06-20 09:14:45 +01:00
|
|
|
cp -p ascii/distro/* "${DESTDIR}""${PREFIX}""${ASCIIDIR}"
|
|
|
|
cp -p neofetch.1 "${DESTDIR}""${PREFIX}""${MANDIR}"
|