Commit 143b683d authored by Aral Balkan's avatar Aral Balkan
Browse files

Added function to get account name via GitLab API. Added Ind.ie balloon to name.

parent 1744d407
...@@ -67,17 +67,29 @@ ask() { ...@@ -67,17 +67,29 @@ ask() {
done done
} }
#
# Prints out a link to the Better app on the App Store on premature exits.
#
exitPS(){ exitPS(){
echo "PS. You can purchase and install Better from the App Store at:\nhttps://itunes.apple.com/us/app/better-by-ind.ie/id1080964978?mt=8\n" echo "PS. You can purchase and install Better from the App Store at:\nhttps://itunes.apple.com/us/app/better-by-ind.ie/id1080964978?mt=8\n"
echo "Laura, Osky, and I (Aral) appreciate your support! :)\nhttps://ind.ie/team\n" echo "Laura, Osky, and I (Aral) appreciate your support! :)\nhttps://ind.ie/team\n"
} }
#
# Returns the account name for the account associated with the private token.
#
accountName(){
accountName=$(curl --silent --header "PRIVATE-TOKEN: ${privateToken}" -X GET https://source.ind.ie/api/v3/user/ | ./jq --raw-output .username)
echo $accountName
}
menu(){ menu(){
echo "" echo " _ _"
echo " ____ _ _ "; echo " ( \/ )"
echo " | _ \ | | | | "; echo " ____ _ _ \ /";
echo " | |_) | ___| |_| |_ ___ _ __ "; echo " | _ \ | | | | \/";
echo " | _ < / _ \ __| __/ _ \ '__|"; echo " | |_) | ___| |_| |_ ___ _ __ |";
echo " | _ < / _ \ __| __/ _ \ '__| /";
echo " | |_) | __/ |_| || __/ | "; echo " | |_) | __/ |_| || __/ | ";
echo " |____/ \___|\__|\__\___|_| "; echo " |____/ \___|\__|\__\___|_| ";
...@@ -246,7 +258,7 @@ install(){ ...@@ -246,7 +258,7 @@ install(){
fi fi
echo "\n • Cloning ${humanName}…" echo "\n • Cloning ${humanName}…"
git clone --quiet git@source.ind.ie:better/${componentToInstall}.git git clone --quiet git@source.ind.ie:${accountName}/${componentToInstall}.git
echo "\n • Running installation script for ${humanName}…" echo "\n • Running installation script for ${humanName}…"
cd $componentToInstall cd $componentToInstall
...@@ -265,7 +277,7 @@ install(){ ...@@ -265,7 +277,7 @@ install(){
} }
# #
# Forks and installs a component. e.g., ensureForkExists "app" "Better iOS App" # Forks (if necessary) and installs a component. e.g., ensureForkExists "app" "Better iOS App" "<ID of project on source.ind.ie>"
# #
ensureForkExists(){ ensureForkExists(){
componentToInstall=$1 componentToInstall=$1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment