Cleaned up some scripts

This commit is contained in:
2021-12-30 20:55:40 -05:00
parent 670554b369
commit b380cb1190
3 changed files with 9 additions and 4 deletions

View File

@@ -10,8 +10,10 @@ uid="$(id -u "$(whoami)")"
mkdir -p "$agent_dir"
for file in "${DOTFILES}"/macOS/LaunchAgents/*.plist; do
filename=$(basename "${file}")
# get just the base file name, similar to using `basename` but w/o a subshell
filename="${file##*/}"
path="${agent_dir}/${filename}"
echo "$filename"
if ! test -e "${path}"; then
echo "Installing Agent: ${filename}"
cp "${file}" "${path}"