bootstrap/stower.sh
Adam Goldsmith e150d29cdc Split into multiple files
much more modular, also adds support for PRESTOW and POSTSTOW files
2015-09-05 13:11:10 -04:00

27 lines
401 B
Bash
Executable File

#!/bin/bash
targets="$@"
for t in $targets
do
if [ -d "$t" ]
then
echo "Stowing $t"
if [ -e "$t/PRESTOW" ]
then
echo "Running $t/PRESTOW"
"$t/PRESTOW"
fi
stow -t"$HOME" --ignore="^PRESTOW$" --ignore="^POSTSTOW$" "$t"
if [ -e "$t/POSTSTOW" ]
then
echo "Running $t/POSTSTOW"
"$t/POSTSTOW"
fi
else
echo "target $t does not exist or is not a directory"
exit
fi
done