generated from me/template-mit
Begin adding the code which syncs up the project and distributes the files.
This commit is contained in:
24
rc_shared.sh
24
rc_shared.sh
@@ -106,9 +106,29 @@ alias shared-reload="update-shared"
|
|||||||
|
|
||||||
project="$HOME/.env-shared"
|
project="$HOME/.env-shared"
|
||||||
function update-shared2 {
|
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 \
|
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
|
fi
|
||||||
}
|
}
|
||||||
if [[ -d $project ]]; then
|
if [[ -d $project ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user