-
-
Save Sketches-su/29e2220f693c2ff37cfe to your computer and use it in GitHub Desktop.
Revisions
-
Sketches-su revised this gist
Feb 4, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
Empty file. -
Sketches-su created this gist
Feb 4, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ #!/bin/bash # A set of console shortcuts. Save it to ~/bin/plz and chmod a+x ~/bin/plz case "$1" in "gi") # Add empty .gitignore to current dir [ -f .gitignore ] || touch .gitignore ;; "ht") # Add restricting .htaccess to current dir [ -f .htaccess ] || echo -e "Order Allow,Deny\nDeny From All" > .htaccess ;; ".git") # Init non-bare GIT repo in current dir if [ ! -d .git ]; then git init git config user.name Sketches git config user.email [email protected] echo "/cgi-bin" >> .git/info/exclude echo "/nbproject" >> .git/info/exclude if [ ! -f .gitignore ]; then touch .gitignore if [ -d vendor ]; then echo "/vendor" >> .gitignore fi echo "!.gitignore" >> .gitignore echo "!.htaccess" >> .gitignore fi fi ;; *) echo "Error!" sleep 3 ;; esac