Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
740c91103a | ||
|
|
80f289a6b8 | ||
|
|
e919d07068 | ||
|
|
2e95c72d57 | ||
|
|
f790b05831 | ||
|
|
c849ac76e2 | ||
|
|
029fce45b4 | ||
|
|
e9d1928b90 | ||
|
|
14394e5c51 |
@@ -1 +1 @@
|
||||
3.0.0
|
||||
3.0.2
|
||||
|
||||
13
CHANGES.adoc
13
CHANGES.adoc
@@ -1,5 +1,18 @@
|
||||
= Changes
|
||||
|
||||
== 13.0.0 (2021-08-01)
|
||||
|
||||
* Added install Node function - Brooke Kuhlmann
|
||||
* Updated Node package install script to use NPM - Brooke Kuhlmann
|
||||
* Updated Ruby installer to use Frum - Brooke Kuhlmann
|
||||
* Updated shell option help text - Brooke Kuhlmann
|
||||
* Removed NPM install check function - Brooke Kuhlmann
|
||||
|
||||
== 12.0.1 (2021-07-17)
|
||||
|
||||
* Updated to Ruby 3.0.1 - Brooke Kuhlmann
|
||||
* Updated to Ruby 3.0.2 - Brooke Kuhlmann
|
||||
|
||||
== 12.0.0 (2021-03-16)
|
||||
|
||||
* Fixed environment configuration to source Bash resource - Brooke Kuhlmann
|
||||
|
||||
@@ -59,7 +59,7 @@ To install, run:
|
||||
----
|
||||
git clone https://github.com/bkuhlmann/mac_os.git
|
||||
cd mac_os
|
||||
git checkout 12.0.0
|
||||
git checkout 13.0.0
|
||||
----
|
||||
|
||||
== Usage
|
||||
|
||||
@@ -10,7 +10,7 @@ IFS=$'\n\t'
|
||||
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/install_node_packages"
|
||||
|
||||
if [[ -x "$SCRIPT_PATH" ]]; then
|
||||
check_yarn_install
|
||||
install_node
|
||||
"$SCRIPT_PATH"
|
||||
else
|
||||
printf "WARNING: Node packages install script does not exist or is not executable.\n"
|
||||
|
||||
2
bin/run
2
bin/run
@@ -45,7 +45,7 @@ while true; do
|
||||
printf " rc: Install Rust crates.\n"
|
||||
printf " d: Apply default settings.\n"
|
||||
printf " cs: Configure installed software.\n"
|
||||
printf " i: Install everything (i.e. executes all install options in order listed).\n"
|
||||
printf " i: Install all (i.e. executes all of the above steps in order listed).\n"
|
||||
printf " Restore:\n"
|
||||
printf " R: Restore settings from backup.\n"
|
||||
printf " Manage:\n"
|
||||
|
||||
@@ -188,14 +188,23 @@ install_program() {
|
||||
}
|
||||
export -f install_program
|
||||
|
||||
# Installs Node.
|
||||
# Parameters: None.
|
||||
install_node() {
|
||||
if ! command -v fnm > /dev/null; then
|
||||
$(get_homebrew_bin_root)/fnm install --lts
|
||||
fi
|
||||
}
|
||||
export -f install_node
|
||||
|
||||
# Installs Ruby.
|
||||
# Parameters: None.
|
||||
install_ruby() {
|
||||
local version="$(cat $HOME/.ruby-version | tr -d '\n')"
|
||||
|
||||
if [[ ! -x "$(command -v ruby)" && -n $(ruby --version | grep --quiet "$version") ]]; then
|
||||
$(get_homebrew_bin_root)/ruby-install "ruby-$version"
|
||||
chruby "$version"
|
||||
$(get_homebrew_bin_root)/frum install "$version"
|
||||
$(get_homebrew_bin_root)/frum local "$version"
|
||||
gem update --system && gem update
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -101,16 +101,6 @@ get_install_root() {
|
||||
}
|
||||
export -f get_install_root
|
||||
|
||||
# Checks Yarn has been installed and exits if otherwise.
|
||||
# Parameters: None.
|
||||
check_yarn_install() {
|
||||
if ! command -v yarn > /dev/null; then
|
||||
printf "%s\n" "ERROR: Yarn can't be found. Please ensure Homebrew and Yarn have been installed."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
export -f check_yarn_install
|
||||
|
||||
# Checks Mac App Store (mas) CLI has been installed and exits if otherwise.
|
||||
# Parameters: None.
|
||||
check_mas_install() {
|
||||
|
||||
@@ -129,13 +129,13 @@ export -f verify_path
|
||||
|
||||
# Checks for missing Node packages.
|
||||
verify_node_packages() {
|
||||
local packages=$(yarn global list --json | grep '"type":"info"')
|
||||
|
||||
printf "\nChecking Node packages...\n"
|
||||
|
||||
while read line; do
|
||||
if [[ "$line" == "yarn global add"* ]]; then
|
||||
if [[ "$line" == "npm "* ]]; then
|
||||
local package=$(printf "$line" | awk '{print $4}')
|
||||
local packages=($(npm list --global --depth=0 | grep "$package"))
|
||||
|
||||
verify_listed_application "$package" "${packages[*]}"
|
||||
fi
|
||||
done < "$MAC_OS_CONFIG_PATH/bin/install_node_packages"
|
||||
|
||||
Reference in New Issue
Block a user