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

Now forking the themes and content repositories also.

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