Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
740c91103a | ||
|
|
80f289a6b8 | ||
|
|
e919d07068 | ||
|
|
2e95c72d57 | ||
|
|
f790b05831 | ||
|
|
c849ac76e2 |
@@ -1,5 +1,13 @@
|
|||||||
= Changes
|
= 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)
|
== 12.0.1 (2021-07-17)
|
||||||
|
|
||||||
* Updated to Ruby 3.0.1 - Brooke Kuhlmann
|
* Updated to Ruby 3.0.1 - Brooke Kuhlmann
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ To install, run:
|
|||||||
----
|
----
|
||||||
git clone https://github.com/bkuhlmann/mac_os.git
|
git clone https://github.com/bkuhlmann/mac_os.git
|
||||||
cd mac_os
|
cd mac_os
|
||||||
git checkout 12.0.1
|
git checkout 13.0.0
|
||||||
----
|
----
|
||||||
|
|
||||||
== Usage
|
== Usage
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ IFS=$'\n\t'
|
|||||||
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/install_node_packages"
|
SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/install_node_packages"
|
||||||
|
|
||||||
if [[ -x "$SCRIPT_PATH" ]]; then
|
if [[ -x "$SCRIPT_PATH" ]]; then
|
||||||
check_yarn_install
|
install_node
|
||||||
"$SCRIPT_PATH"
|
"$SCRIPT_PATH"
|
||||||
else
|
else
|
||||||
printf "WARNING: Node packages install script does not exist or is not executable.\n"
|
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 " rc: Install Rust crates.\n"
|
||||||
printf " d: Apply default settings.\n"
|
printf " d: Apply default settings.\n"
|
||||||
printf " cs: Configure installed software.\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 " Restore:\n"
|
||||||
printf " R: Restore settings from backup.\n"
|
printf " R: Restore settings from backup.\n"
|
||||||
printf " Manage:\n"
|
printf " Manage:\n"
|
||||||
|
|||||||
@@ -188,14 +188,23 @@ install_program() {
|
|||||||
}
|
}
|
||||||
export -f 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.
|
# Installs Ruby.
|
||||||
# Parameters: None.
|
# Parameters: None.
|
||||||
install_ruby() {
|
install_ruby() {
|
||||||
local version="$(cat $HOME/.ruby-version | tr -d '\n')"
|
local version="$(cat $HOME/.ruby-version | tr -d '\n')"
|
||||||
|
|
||||||
if [[ ! -x "$(command -v ruby)" && -n $(ruby --version | grep --quiet "$version") ]]; then
|
if [[ ! -x "$(command -v ruby)" && -n $(ruby --version | grep --quiet "$version") ]]; then
|
||||||
$(get_homebrew_bin_root)/ruby-install "ruby-$version"
|
$(get_homebrew_bin_root)/frum install "$version"
|
||||||
chruby "$version"
|
$(get_homebrew_bin_root)/frum local "$version"
|
||||||
gem update --system && gem update
|
gem update --system && gem update
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,16 +101,6 @@ get_install_root() {
|
|||||||
}
|
}
|
||||||
export -f 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.
|
# Checks Mac App Store (mas) CLI has been installed and exits if otherwise.
|
||||||
# Parameters: None.
|
# Parameters: None.
|
||||||
check_mas_install() {
|
check_mas_install() {
|
||||||
|
|||||||
@@ -129,13 +129,13 @@ export -f verify_path
|
|||||||
|
|
||||||
# Checks for missing Node packages.
|
# Checks for missing Node packages.
|
||||||
verify_node_packages() {
|
verify_node_packages() {
|
||||||
local packages=$(yarn global list --json | grep '"type":"info"')
|
|
||||||
|
|
||||||
printf "\nChecking Node packages...\n"
|
printf "\nChecking Node packages...\n"
|
||||||
|
|
||||||
while read line; do
|
while read line; do
|
||||||
if [[ "$line" == "yarn global add"* ]]; then
|
if [[ "$line" == "npm "* ]]; then
|
||||||
local package=$(printf "$line" | awk '{print $4}')
|
local package=$(printf "$line" | awk '{print $4}')
|
||||||
|
local packages=($(npm list --global --depth=0 | grep "$package"))
|
||||||
|
|
||||||
verify_listed_application "$package" "${packages[*]}"
|
verify_listed_application "$package" "${packages[*]}"
|
||||||
fi
|
fi
|
||||||
done < "$MAC_OS_CONFIG_PATH/bin/install_node_packages"
|
done < "$MAC_OS_CONFIG_PATH/bin/install_node_packages"
|
||||||
|
|||||||
Reference in New Issue
Block a user