Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Jan 18, 2019
1 parent d44766f commit 6fd69fa
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 83 deletions.
37 changes: 0 additions & 37 deletions bin/beautify-ascii-files.bash

This file was deleted.

9 changes: 0 additions & 9 deletions bin/tidy-ascii-files.bash

This file was deleted.

16 changes: 0 additions & 16 deletions bin/validate-bash.bash

This file was deleted.

4 changes: 1 addition & 3 deletions cookbooks/brew/recipes/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ function main()
{
local -r confirm="${1}"

local -r appFolderPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${appFolderPath}/../../../libraries/util.bash"
source "$(dirname "${BASH_SOURCE[0]}")/../../../libraries/util.bash"

checkRequireMacSystem
checkRequireNonRootUser
Expand Down
8 changes: 3 additions & 5 deletions cookbooks/brew/recipes/reinstall.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ function main()
{
local -r confirm="${1}"

local -r appFolderPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${appFolderPath}/../../../libraries/util.bash"
source "$(dirname "${BASH_SOURCE[0]}")/../../../libraries/util.bash"

checkRequireMacSystem
checkRequireNonRootUser

sudo "${appFolderPath}/uninstall.bash" "${confirm}"
"${appFolderPath}/install.bash" "${confirm}"
sudo "$(dirname "${BASH_SOURCE[0]}")/uninstall.bash" "${confirm}"
"$(dirname "${BASH_SOURCE[0]}")/install.bash" "${confirm}"
}

main "${@}"
4 changes: 1 addition & 3 deletions cookbooks/brew/recipes/uninstall.bash
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ function main()
{
local -r confirm="${1}"

local -r appFolderPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${appFolderPath}/../../../libraries/util.bash"
source "$(dirname "${BASH_SOURCE[0]}")/../../../libraries/util.bash"

checkRequireMacSystem
checkRequireRootUser
Expand Down
18 changes: 8 additions & 10 deletions tools/install-brew-applications.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function installDependencies()
{
if [[ "$(existCommand 'brew')" = 'false' ]]
then
"${APP_FOLDER_PATH}/../cookbooks/brew/recipes/install.bash" 'true'
"$(dirname "${BASH_SOURCE[0]}")/../cookbooks/brew/recipes/install.bash" 'true'
fi
}

Expand All @@ -51,21 +51,21 @@ function installBrewPackage()

# Pre Install

if [[ -f "${APP_FOLDER_PATH}/../cookbooks/${packageName}/recipes/pre-install.bash" ]]
if [[ -f "$(dirname "${BASH_SOURCE[0]}")/../cookbooks/${packageName}/recipes/pre-install.bash" ]]
then
sudo "${APP_FOLDER_PATH}/../cookbooks/${packageName}/recipes/pre-install.bash"
sudo "$(dirname "${BASH_SOURCE[0]}")/../cookbooks/${packageName}/recipes/pre-install.bash"
fi

# Install

brew "${packageType[@]}" reinstall "${packageName}"
displayVersion "$(brew list --versions "${packageName}")"
brew ${packageType[@]} reinstall "${packageName}"
displayVersion "$(brew ${packageType[@]} list --versions "${packageName}")"

# Post Install

if [[ -f "${APP_FOLDER_PATH}/../cookbooks/${packageName}/recipes/post-install.bash" ]]
if [[ -f "$(dirname "${BASH_SOURCE[0]}")/../cookbooks/${packageName}/recipes/post-install.bash" ]]
then
sudo "${APP_FOLDER_PATH}/../cookbooks/${packageName}/recipes/post-install.bash"
sudo "$(dirname "${BASH_SOURCE[0]}")/../cookbooks/${packageName}/recipes/post-install.bash"
fi
done
}
Expand Down Expand Up @@ -101,9 +101,7 @@ function install()

function main()
{
APP_FOLDER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${APP_FOLDER_PATH}/../libraries/util.bash"
source "$(dirname "${BASH_SOURCE[0]}")/../libraries/util.bash"

# Parsing Command Arguments

Expand Down

0 comments on commit 6fd69fa

Please sign in to comment.