Skip to content

Commit

Permalink
install_scripts: Add symlink macos-scripts repo
Browse files Browse the repository at this point in the history
- Only some scripts in the repo as determined by file names in macos_script_bin_files array
  • Loading branch information
0xmachos committed Apr 25, 2024
1 parent e99fbd1 commit 47bf7fe
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bittersweet
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,8 @@ function install_scripts {
# Symlink files in /usr/local/bin

local -r dir=$(pwd)
local -ar bin_files=(dns pihole_stats sublime_backup)
local -ar bin_files=(dns pihole_stats sublime_backup)
local -ar macos_script_bin_files=(c0design)

# Create /usr/local/bin
if ! [[ -d "/usr/local/bin/" ]]; then
Expand Down Expand Up @@ -553,6 +554,15 @@ function install_scripts {
else
echo "[❌] Failed to link bittersweet to /usr/local/bin/bittersweet"
fi

# Symlink some files in macos-scripts repo into /usr/local/bin
for macos_script in "${macos_script_bin_files[@]}"; do
if sudo ln -sfn "$HOME/Documents/Projects/macos-scripts/${macos_script}" "/usr/local/bin/${macos_script}"; then
echo "[✅] Successfully linked ${macos_script} to /usr/local/bin/${macos_script}"
else
echo "[❌] Failed to link ${macos_script} to /usr/local/bin/${macos_script}"
fi
done
}


Expand Down

0 comments on commit 47bf7fe

Please sign in to comment.