Last active
April 5, 2019 12:11
-
-
Save maehler/52de61f6f8abbed178cd04ccae0ae2dd to your computer and use it in GitHub Desktop.
Initialise a new reveal.js presentation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
usage() { | |
echo >&2 "usage: $0 <presentation_name>" | |
exit $1 | |
} | |
if [[ $# -ne 1 ]]; then | |
echo >&2 "error: wrong number of arguments" | |
usage 1 | |
fi | |
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then | |
usage 0 | |
fi | |
name=$1 | |
user="maehler" | |
github="git@github.com:${user}" | |
git clone ${github}/reveal.js ${name} | |
cd ${name} | |
git remote set-url origin ${github}/${name} | |
git remote add upstream ${github}/reveal.js | |
echo -e "\nDon't forget to create the repository \"${name}\" on Github" | |
echo "Go here: https://github.com/new" | |
echo "Then do: git push -u origin master" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment