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

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

parent 1744d407
......@@ -67,17 +67,29 @@ ask() {
done
}
#
# Prints out a link to the Better app on the App Store on premature exits.
#
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 "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(){
echo ""
echo " ____ _ _ ";
echo " | _ \ | | | | ";
echo " | |_) | ___| |_| |_ ___ _ __ ";
echo " | _ < / _ \ __| __/ _ \ '__|";
echo " _ _"
echo " ( \/ )"
echo " ____ _ _ \ /";
echo " | _ \ | | | | \/";
echo " | |_) | ___| |_| |_ ___ _ __ |";
echo " | _ < / _ \ __| __/ _ \ '__| /";
echo " | |_) | __/ |_| || __/ | ";
echo " |____/ \___|\__|\__\___|_| ";
......@@ -246,7 +258,7 @@ install(){
fi
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}…"
cd $componentToInstall
......@@ -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(){
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