Commit 8a73d26c authored by Aral Balkan's avatar Aral Balkan
Browse files

Now only forking if fork was selected. Minor display updates to status messages.

parent a5c622a2
...@@ -198,8 +198,10 @@ indentOutput(){ ...@@ -198,8 +198,10 @@ indentOutput(){
# #
installEverything(){ installEverything(){
echo "\nForking." if [ $optionForkFirst = true ]; then
forkEverything echo "\nForking…"
forkEverything
fi
echo "\nInstalling everything." echo "\nInstalling everything."
...@@ -211,8 +213,10 @@ installEverything(){ ...@@ -211,8 +213,10 @@ installEverything(){
} }
installInspector(){ installInspector(){
echo "\nForking inspector (and builder)." if [ $optionForkFirst = true ]; then
forkInspector echo "\nForking inspector (and builder)…"
forkInspector
fi
echo "\nInstalling inspector." echo "\nInstalling inspector."
install "inspector" "Better Inspector" install "inspector" "Better Inspector"
...@@ -228,14 +232,14 @@ install(){ ...@@ -228,14 +232,14 @@ install(){
# Check if a Better Builder installation exists. # Check if a Better Builder installation exists.
if [ -d componentToInstall ]; then if [ -d componentToInstall ]; then
echo " · Existing ${humanName} found. Skipping installation." echo " Existing ${humanName} found. Skipping installation."
return 0 return 0
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:better/${componentToInstall}.git
echo "\n · Running installation script for ${humanName}…" echo "\n Running installation script for ${humanName}…"
cd $componentToInstall cd $componentToInstall
indentOutput "./install" ' ' indentOutput "./install" ' '
cd .. cd ..
...@@ -243,7 +247,7 @@ install(){ ...@@ -243,7 +247,7 @@ install(){
# Check that the installation completed successfully # Check that the installation completed successfully
if [ -f "/tmp/better.fyi.${componentToInstall}.installation.is.incomplete" ]; then if [ -f "/tmp/better.fyi.${componentToInstall}.installation.is.incomplete" ]; then
# Error # Error
echo " · Error: ${humanName} installation was interrupted. Exiting." echo " Error: ${humanName} installation was interrupted. Exiting."
exit 1 exit 1
fi fi
...@@ -261,14 +265,13 @@ fork(){ ...@@ -261,14 +265,13 @@ fork(){
# Check if a Better Builder installation exists. # Check if a Better Builder installation exists.
if [ -d componentToInstall ]; then if [ -d componentToInstall ]; then
echo " · Existing ${humanName} found locally. Skipping fork." echo " Existing ${humanName} found locally. Skipping fork."
return 0 return 0
fi fi
echo "\n · Forking ${humanName}…" echo "\n Forking ${humanName}…"
forkResult=$(curl --silent --header "PRIVATE-TOKEN: ${privateToken}" -X POST https://source.ind.ie/api/v3/projects/fork/${projectID}) forkResult=$(curl --silent --header "PRIVATE-TOKEN: ${privateToken}" -X POST https://source.ind.ie/api/v3/projects/fork/${projectID})
echo "Fork result: ${forkResult}"
} }
# #
...@@ -284,7 +287,7 @@ forkInspector(){ ...@@ -284,7 +287,7 @@ forkInspector(){
# #
forkEverything(){ forkEverything(){
fork "app" "Better iOS App" "107" fork "app" "Better iOS App" "107"
forkTheInspector forkInspector
fork "safari" "Better Safari Extension" "152" fork "safari" "Better Safari Extension" "152"
} }
......
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