Commit 446c4b86 authored by Aral Balkan's avatar Aral Balkan
Browse files

Now forking the themes and content repositories also.

parent eadb7fc9
...@@ -27,11 +27,16 @@ set -e ...@@ -27,11 +27,16 @@ set -e
# #
################################################################################ ################################################################################
#
# Properties
#
optionInstallEverything=false optionInstallEverything=false
optionFork=false optionFork=false
optionAccountName=better optionAccountName=better
humanNameOfThingToInstall=null humanNameOfThingToInstall=null
ask() { ask() {
# Modified slightly from https://gist.github.com/davejamesmiller/1965569 # Modified slightly from https://gist.github.com/davejamesmiller/1965569
while true; do while true; do
...@@ -84,6 +89,7 @@ accountName(){ ...@@ -84,6 +89,7 @@ accountName(){
echo $accountName echo $accountName
} }
menu(){ menu(){
echo " _ _" echo " _ _"
echo " ( \/ )" echo " ( \/ )"
...@@ -167,7 +173,7 @@ To continue: ...@@ -167,7 +173,7 @@ To continue:
fi fi
# #
# Summarise # Summarise.
# #
echo "\nThank you! :)\n\nI’m going to: \n" echo "\nThank you! :)\n\nI’m going to: \n"
...@@ -179,18 +185,20 @@ To continue: ...@@ -179,18 +185,20 @@ To continue:
if [ $optionFork = true ]; then if [ $optionFork = true ]; then
# Get the account name # Get the account name.
optionAccountName=$(accountName) optionAccountName=$(accountName)
# Persist the account name in a hidden file so that the other
# installers can use it also
echo $optionAccountName > .accountname
echo "• Use (and create, if necessary) your own forks on your\n ${optionAccountName} GitLab account on source.ind.ie." echo "• Use (and create, if necessary) your own forks on your\n ${optionAccountName} GitLab account on source.ind.ie."
else else
echo "• Using the canonical repositories (read-only unless you have commit access)." echo "• Using the canonical repositories (read-only unless you have commit access)."
fi fi
#
# Persist the account name in a hidden file so that the other
# installers can use it also.
#
echo $optionAccountName > .accountname
# #
# Confirm. # Confirm.
# #
...@@ -207,15 +215,19 @@ To continue: ...@@ -207,15 +215,19 @@ To continue:
fi fi
} }
#
# Runs command in requested directory and restores the working directory at the end. # Runs command in requested directory and restores the working directory at the end.
# Usage: run <directory> "<command>" # Usage: run <directory> "<command>"
#
runIn(){ runIn(){
pushd $1 >/dev/null pushd $1 >/dev/null
eval $2 eval $2
popd >/dev/null popd >/dev/null
} }
#
# Runs the passed command, formatting the output with the passed indentation (default: 4 spaces) # Runs the passed command, formatting the output with the passed indentation (default: 4 spaces)
#
indentOutput(){ indentOutput(){
commandToRun=$1 commandToRun=$1
indentation=${2:-' '} indentation=${2:-' '}
...@@ -242,6 +254,7 @@ installEverything(){ ...@@ -242,6 +254,7 @@ installEverything(){
install "safari" "Better Safari Extension" install "safari" "Better Safari Extension"
} }
installInspector(){ installInspector(){
if [ $optionFork = true ]; then if [ $optionFork = true ]; then
echo "\nForking inspector (and builder)…" echo "\nForking inspector (and builder)…"
...@@ -311,7 +324,10 @@ ensureForkExists(){ ...@@ -311,7 +324,10 @@ ensureForkExists(){
# #
ensureForksExistForInspector(){ ensureForksExistForInspector(){
ensureForkExists "inspector" "Better Inspector" "151" ensureForkExists "inspector" "Better Inspector" "151"
ensureForkExists "builder" "Better Builder" "105" ensureForkExists "builder" "Better Builder" "105"
ensureForkExists "themes" "Better Themes" "136"
ensureForkExists "content" "Better Content" "106"
} }
# #
......
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