This commit is contained in:
Jack L. Frost 2016-01-12 16:15:56 +03:00
parent 0c116747d9
commit 010e9dc998
3 changed files with 4 additions and 1 deletions

View File

@ -5,3 +5,5 @@ LOGDIR=${LOGDIR:-"/tmp/userrc"}
BINDIR=${BINDIR:-"${PREFIX}/bin"} BINDIR=${BINDIR:-"${PREFIX}/bin"}
CONFDIR=${CONFDIR:-"${PREFIX}/etc"} CONFDIR=${CONFDIR:-"${PREFIX}/etc"}
CONFIG=${CONFIG:-"${CONFDIR}/userrc.conf"} CONFIG=${CONFIG:-"${CONFDIR}/userrc.conf"}
BASH=${BASH:="/usr/bin/bash"}

View File

@ -9,6 +9,7 @@ set_vars() {
sed -r \ sed -r \
-e "s%@CONFIG@%${CONFIG}%" \ -e "s%@CONFIG@%${CONFIG}%" \
-e "s%@LOGDIR@%${LOGDIR}%" \ -e "s%@LOGDIR@%${LOGDIR}%" \
-e "s%@BASH@%${BASH}%" \
< "$i".in > "$i" < "$i".in > "$i"
done done
} }

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!@BASH@
msg() { printf '%s\n' "$*"; } msg() { printf '%s\n' "$*"; }
err() { printf '%s\n' "$*" >&2; } err() { printf '%s\n' "$*" >&2; }