Last active
December 28, 2015 22:09
-
-
Save geoffyuen/7570048 to your computer and use it in GitHub Desktop.
bash script / OSX .command menu to use git ftp. Requirements: - GIT
- GIT FTP
- a GIT repro Put this in the folder you're working in and chmod 777 it.
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 | |
cd "$(dirname "$0")" | |
clear | |
echo "GIT FTP Menu (ctrl-c to abort)" | |
echo | |
PS3='Please enter your choice: ' | |
options=("Commit" "Mock Upload" "Configure" "First Time Commit" "Quit") | |
select opt in "${options[@]}" | |
do | |
case $opt in | |
"Commit") | |
echo "Commiting..." | |
git ftp push | |
;; | |
"Mock Upload") | |
echo "This is a test..." | |
git ftp push -D | |
;; | |
"Configure") | |
echo "FTP username:" | |
read input_variable | |
git config git-ftp.user $input_variable | |
echo "FTP password:" | |
read input_variable | |
git config git-ftp.password $input_variable | |
echo "FTP full url path (ftp://google.com/thisfolder/overhere):" | |
read input_variable | |
git config git-ftp.url $input_variable | |
echo "You're ready to do your first time commit" | |
read input_variable | |
;; | |
"First Time Commit") | |
echo "First time upload..." | |
git ftp init | |
;; | |
"Quit") | |
echo "You can close or quit this window" | |
break | |
;; | |
*) echo invalid option;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment