generated from me/template-mit
Compare commits
5 Commits
074f0a29bf
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| 391b0a0b09 | |||
| a76cb8b5ec | |||
| a87c205a80 | |||
| 186519fb0e | |||
| 7fa1430b34 |
41
rc_shared.sh
41
rc_shared.sh
@@ -60,6 +60,21 @@ function update-shared {
|
|||||||
|
|
||||||
mv -v $dir/rc_shared.sh ~/.rc_shared
|
mv -v $dir/rc_shared.sh ~/.rc_shared
|
||||||
|
|
||||||
|
local_bin="$HOME/bin"
|
||||||
|
remote_bin="shared-rc-deleteme/bin-shared"
|
||||||
|
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"/
|
||||||
|
else
|
||||||
|
echo "Did not find '$local_bin', did not copy scripts."
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "\n`date` - Done! Removing git clone.\n"
|
||||||
mv -v $dir ~/TRASH/"$dir-`date "+%Y%m%d-%H%M%S"`"
|
mv -v $dir ~/TRASH/"$dir-`date "+%Y%m%d-%H%M%S"`"
|
||||||
|
|
||||||
log "\n`date` - Complete! Please note this does NOT update bin files."
|
log "\n`date` - Complete! Please note this does NOT update bin files."
|
||||||
@@ -99,6 +114,25 @@ function clone {
|
|||||||
function now { date "+%Y%m%d-%H%M%S"; }
|
function now { date "+%Y%m%d-%H%M%S"; }
|
||||||
function today { date "+%Y%m%d"; }
|
function today { date "+%Y%m%d"; }
|
||||||
|
|
||||||
|
function log { echo -e "$1"; }
|
||||||
|
function blog { echo -e "\n\n$1\n\n"; }
|
||||||
|
|
||||||
|
function pull {
|
||||||
|
if [[ -d .git ]]; then
|
||||||
|
git pull --recurse-submodules
|
||||||
|
else
|
||||||
|
pull-clone
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function push {
|
||||||
|
if [[ -d .git ]]; then
|
||||||
|
git push && load-stage && load-prod
|
||||||
|
else
|
||||||
|
send-master
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Enhance Bin Scripts #
|
# Enhance Bin Scripts #
|
||||||
|
|
||||||
# MASTER and CLONE folders.
|
# MASTER and CLONE folders.
|
||||||
@@ -141,6 +175,13 @@ function sync-all {
|
|||||||
|
|
||||||
echo -e "`date` - \nDone."
|
echo -e "`date` - \nDone."
|
||||||
}
|
}
|
||||||
|
function sync-all-loop {
|
||||||
|
while true; do
|
||||||
|
sync-all
|
||||||
|
echo -e "\n\n*** Sleeping... ***\n\n"
|
||||||
|
sleep 30
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# SYNC folders.
|
# SYNC folders.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user