Unverified Commit bc5f2808 authored by Aral Balkan's avatar Aral Balkan
Browse files

Update all echo statements to include the -e flag

parent 2ac07c2b
......@@ -54,7 +54,7 @@ indent() {
}
greetings(){
echo "\n❤ Installing Better Inspector."
echo -e "\n❤ Installing Better Inspector."
}
#
......@@ -83,16 +83,16 @@ ensureNodeExists(){
latestNodeLTSVersion=4.4.7
if ! hash node 2>/dev/null; then
echo "\n • Node.js not installed. Installing…"
echo -e "\n • Node.js not installed. Installing…"
# Prepare a temporary directory.
rm -rf /tmp/node.js
mkdir /tmp/node.js
echo " • Downloading Node.js installer (latest LTS)…"
echo -e " • Downloading Node.js installer (latest LTS)…"
runIn /tmp/node.js "curl -OL https://nodejs.org/dist/latest-argon/node-v${latestNodeLTSVersion}.pkg"
echo " • Running the Node.js package installer. Please enter your password to continue:"
echo -e " • Running the Node.js package installer. Please enter your password to continue:"
sudo installer -pkg "/tmp/node.js/node-v${latestNodeLTSVersion}.pkg" -target /
# The OS X installer doesn’t automatically adjust the permissions for /usr/local
......@@ -117,14 +117,14 @@ install(){
# Check if a Better Builder installation exists.
if [ -d $relativePathToComponent ]; then
echo " • Existing ${humanName} found. Skipping installation."
echo -e " • Existing ${humanName} found. Skipping installation."
return 0
fi
echo "\n • Cloning ${humanName}…"
echo -e "\n • Cloning ${humanName}…"
runIn .. "git clone --quiet git@source.ind.ie:${accountName}/${componentToInstall}.git"
echo "\n • Running installation script for ${humanName}…"
echo -e "\n • Running installation script for ${humanName}…"
cd $relativePathToComponent
./install | indent ' '
cd ../inspector
......@@ -132,18 +132,18 @@ install(){
# Check that the installation completed successfully
if [ -f "/tmp/better.fyi.${componentToInstall}.installation.is.incomplete" ]; then
# Error
echo " • Error: ${humanName} installation was interrupted. Exiting."
echo -e " • Error: ${humanName} installation was interrupted. Exiting."
exit 1
fi
# OK
echo "\n${humanName} installed."
echo -e "\n${humanName} installed."
}
makeDirectoryIfItDoesntAlreadyExist(){
if ! [ -d $1 ]; then
echo " • Making the $1 directory."
echo -e " • Making the $1 directory."
mkdir -p $1
fi
}
......@@ -155,7 +155,7 @@ cloneDraftsRepositoryIfItDoesntExist(){
workingCopyPath="${draftsPath}/${repositoryName}"
if ! [ -d workingCopyPath ]; then
echo " • Cloning drafts repository: ${repositoryName}"
echo -e " • Cloning drafts repository: ${repositoryName}"
runIn $draftsPath "git clone --quiet https://drafts.better.fyi/inspector/${repositoryName}.git"
fi
}
......@@ -165,7 +165,7 @@ installSelf(){
#
# Install ourselves.
#
echo " • Installing node dependencies via npm."
echo -e " • Installing node dependencies via npm."
npm install
#
......@@ -186,7 +186,7 @@ installSelf(){
#
# Clone the domains repository.
#
echo " • Cloning domains repository"
echo -e " • Cloning domains repository"
runIn ~/better.fyi "git clone --quiet https://source.ind.ie/better/domains.git"
# Make a symbolic link to the domains repository for ease of access during development.
......@@ -195,7 +195,7 @@ installSelf(){
#
# Download the archive.
#
echo " • Downloading HTTP Archive (this will take a while)."
echo -e " • Downloading HTTP Archive (this will take a while)."
#
# Create the archive directory.
......@@ -212,7 +212,7 @@ installSelf(){
#
# Run a local inquiry
#
echo " • Running a local inquiry to build the statistics and drafts. This will take a couple of minutes."
echo -e " • Running a local inquiry to build the statistics and drafts. This will take a couple of minutes."
./inquiry --local
}
......@@ -239,9 +239,9 @@ getAccountName(){
accountName=$(cat "${persistedAccountName}")
if [ $accountName = 'better' ]; then
echo " • Will clone from the canonical Better repository."
echo -e " • Will clone from the canonical Better repository."
else
echo " • Will clone from your custom fork in the ${acccountName} account."
echo -e " • Will clone from your custom fork in the ${acccountName} account."
fi
fi
}
......
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