M42OHPOMC7JCXLRQG3DVMJKQFQZXGJMUEO6D6WBLYURPPY7XJ73AC
#!/bin/sh
yellow="\033[33m"
blue="\033[34m"
traverse() {
for package in "$(pwd)"/*; do
if [ -d "$package" ]; then
printf "$yellow------ %s ------\n$blue" "$(basename "$package")"
stow "$1" "$(basename "$package")" --verbose
fi
done
}
case "$1" in
link)
if [ "$2" = "" ]; then
traverse "-R"
else
printf "$yellow------ %s ------\n$blue" "$2"
stow -R "$2" --verbose
fi
;;
unlink)
if [ "$2" = "" ]; then
traverse "-D"
else
printf "$yellow------ %s ------\n$blue" "$2"
stow -D "$2" --verbose
fi
;;
*)
exit 1
;;
esac