scripts/refresh_from_current_assets.sh
2022-07-06 16:25:25 +02:00

35 lines
1.4 KiB
Bash
Executable File

#/bin/bash
# @author script by @tykayn - contact at cipherbliss.com
# rafraîchir les assets du dépot d'example versionné avec ceux couramment utilisés.
# à installer sur un ordi que l'on utilise en tant que référence d'assets
# à installer en cronjob avec:
# crontab -e
#
# m h dom mon dow command
# */30 * * * * bash /home/tykayn/www/scripts/refresh_from_current_assets.sh
# configs
export USERNAME_CURRENT=tykayn
export HOME_OF_SCRIPTS=/home/$USERNAME_CURRENT/www/scripts
export HOME_OF_USERNAME_CURRENT=/home/$USERNAME_CURRENT
echo "mise à jour des assets de référence dans les scripts custom $HOME_OF_SCRIPTS depuis l'ordinateur actuel"
# orgmode
cp "$HOME_OF_USERNAME_CURRENT/.emacs" "$HOME_OF_SCRIPTS/assets/org" -r
cp "$HOME_OF_USERNAME_CURRENT/Nextcloud/textes/orgmode/config.org" "$HOME_OF_SCRIPTS/assets/org" -r
cp "$HOME_OF_USERNAME_CURRENT/Nextcloud/textes/orgmode/style.css" "$HOME_OF_SCRIPTS/assets/org" -r
cp "$HOME_OF_USERNAME_CURRENT/Nextcloud/textes/orgmode/upcalendar.sh" "$HOME_OF_SCRIPTS/assets/org" -r
# sauvegardes
cp "$HOME_OF_USERNAME_CURRENT/sync_spaceship.sh" "$HOME_OF_SCRIPTS/bash/backups"
cp "$HOME_OF_USERNAME_CURRENT/test-func.sh" "$HOME_OF_SCRIPTS/bash/backups"
cp "$HOME_OF_USERNAME_CURRENT/functions_sync.sh" "$HOME_OF_SCRIPTS/bash/backups"
echo "HOME_OF_SCRIPTS : $HOME_OF_SCRIPTS"
ls -l "$HOME_OF_SCRIPTS/assets/org"
cd $HOME_OF_SCRIPTS
git add .
git commit -m "update of assets from refresh script"
git push origin