29 lines
No EOL
652 B
Bash
Executable file
29 lines
No EOL
652 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# DF_SRC_ROOT: dotfiles source root
|
|
# DF_RUNNER_WORKDIR: runner workdir
|
|
# DF_RUNNER_LIBS: libs to include in runner
|
|
# DF_RUNNER_VERBOSE: verbosity runner
|
|
|
|
|
|
if [ -n "$DF_RUNNER_WORKDIR" ]; then
|
|
[ $DF_RUNNER_VERBOSE ] && echo "workdir: $DF_RUNNER_WORKDIR"
|
|
DF_SRC_ROOT=${DF_SRC_ROOT:-$(pwd)}
|
|
cd $DF_RUNNER_WORKDIR
|
|
fi
|
|
|
|
for lib in ${DF_RUNNER_LIBS:-}; do
|
|
if [ -n "$DF_SRC_ROOT" ]; then
|
|
oldpwd=$(pwd)
|
|
cd $DF_SRC_ROOT
|
|
fi
|
|
[ $DF_RUNNER_VERBOSE ] && echo "include: lib/$lib.sh"
|
|
. lib/$lib.sh
|
|
if [ -n "$DF_SRC_ROOT" ]; then
|
|
cd $oldpwd
|
|
fi
|
|
done
|
|
|
|
[ $DF_RUNNER_VERBOSE ] && echo "command: $@"
|
|
|
|
$@ |