Skip to content

Instantly share code, notes, and snippets.

@arrdem
Created December 20, 2016 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arrdem/f1b0dcaf869772041514c2683d0681cf to your computer and use it in GitHub Desktop.
Save arrdem/f1b0dcaf869772041514c2683d0681cf to your computer and use it in GitHub Desktop.
#!/bin/bash
function install_package() {
if [ -e "$1/build.sh" ]; then
( cd "$1";
bash "build.sh")
fi
stow --ignore="build.sh" --ignore="README.md" -t ~ "$f"
}
function install_packages() {
if [ -d "$1" ]; then
( cd "$1";
for f in *; do
if [ -d "$f" ]; then
install_package "$f"
fi
done
)
fi
}
install_packages $(hostname)
install_packages default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment