diff --git a/rc_shared.sh b/rc_shared.sh index de9ab82..cfb9d2f 100644 --- a/rc_shared.sh +++ b/rc_shared.sh @@ -106,9 +106,29 @@ alias shared-reload="update-shared" project="$HOME/.env-shared" function update-shared2 { - if [[ ! -d $project ]]; then + if [[ -d $project ]]; then + log "`date` - Updating '$project'.\n" + cd "$project" + git switch "$branch" + git pull --recurse-submodules + else + log "`date` - Downloading '$project'.\n" git clone https://git.hyperling.com/me/env-shared \ - $dir --branch=$branch + $project --branch=$branch + fi + + if [[ -d "$local_bin" ]]; then + log "\n`date` - Found '$local_bin', adding scripts.\n" + mv -v $remote_bin/*.sh "$local_bin"/ + + refactor_script="refactor_music_library.sh" + wget -O "$refactor_script" \ + https://git.hyperling.com/me/shell-music-refactor-library/src/branch/main/refactor_music_library.sh + mv -v $refactor_script "$local_bin"/ + + chmod 755 -Rv "$local_bin" + else + echo "Did not find '$local_bin', did not copy scripts." fi } if [[ -d $project ]]; then