Last active
January 27, 2019 04:42
-
-
Save cori/9a39a672ca8f0297e59436d58ce3393c to your computer and use it in GitHub Desktop.
init file to set up glitch env
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 | |
# this script adds ~3Mb to your glitch container's /app directory | |
# `wget https://gist.githubusercontent.com/cori/9a39a672ca8f0297e59436d58ce3393c/raw -O glitch-init.sh` | |
# `chmod +x glitch-init.sh` | |
# `./glitch-init.sh` | |
# `source ~/.bashrc` | |
# install bash-it | |
if [ -d ~/.bash_it ]; then | |
source ~/.bashrc | |
else | |
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it | |
/app/.bash_it/install.sh --silent | |
source ~/.bashrc | |
bash-it enable alias git | |
bash-it enable completion git | |
bash-it enable completion hub | |
bash-it enable completion todo | |
bash-it enable plugin todo | |
bash-it enable plugin git | |
bash-it enable plugin hub | |
fi | |
git config --global user.name "cori" | |
git config --global user.email "[email protected]" | |
git config user.name "cori" | |
git config user.email "[email protected]" | |
echo '*.bak' >> .gitignore | |
echo '.wget-hsts' >> .gitignore | |
echo 'glitch-init.sh' >> .gitignore | |
echo '.bash_it/' >> .gitignore | |
if ! [ -f .bash_it/aliases/custom.aliases.bash ]; then | |
# update this with your preferred author information | |
# this will let you use `gcg` to commit to your repo as yourself avoiding the tendency of Glitch to overwrite committer info | |
author="\\\"cori schlegel <[email protected]>\\\"" | |
cat > .bash_it/aliases/custom.aliases.bash <<< "alias gcg=\"git commit --author='$author' -v -am\"" | |
fi | |
refresh |
bash alias still not quite right - ends up with embedded double-quotes that make it fail
https://stackoverflow.com/a/3557165/8151 for better .gitignore handling
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
21b6a8cdf1fc1568e0ff413f513a16ef9cfcf183 finally actually works as hoped