Skip to content

Instantly share code, notes, and snippets.

@d12frosted

d12frosted/emacs-eru

Last active Apr 6, 2021
Embed
What would you like to do?
#!/usr/bin/env bash
set -e
ACTION=$1
emacs_d=$HOME/.config/emacs
if [[ -d "$XDG_CONFIG_HOME" ]]; then
emacs_d="$XDG_CONFIG_HOME/emacs"
fi
function print_usage() {
echo "Usage:
emacs-eru ACTION
Actions:
install Install dependencies, compile and lint configurations
upgrade Upgrade dependencies
test Test configurations
"
}
if [ -z "$ACTION" ]; then
echo "No ACTION is provided"
print_usage
exit 1
fi
case "$ACTION" in
install)
cd "$emacs_d" && {
make bootstrap compile lint roam
}
;;
upgrade)
cd "$emacs_d" && {
make upgrade compile lint
}
;;
test)
cd "$emacs_d" && {
make test
}
;;
*)
echo "Unrecognized ACTION $ACTION"
print_usage
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment