27 lines
401 B
Bash
Executable File
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
|