cron: autogen git_projects
This commit is contained in:
parent
ecf26dbce3
commit
dc1fca1ec6
|
@ -259,6 +259,7 @@ actions:
|
|||
make_theme: _make_theme
|
||||
install_meta: install_meta
|
||||
filter_backgrounds: _backgrouds_filter
|
||||
git_projects: _git_projects
|
||||
|
||||
###############################################################
|
||||
dotfiles: # Just a bunch of paths and action mappings
|
||||
|
@ -381,6 +382,7 @@ dotfiles: # Just a bunch of paths and action mappings
|
|||
dst: ~/.local/share/crontab
|
||||
actions:
|
||||
- crontab_install
|
||||
- git_projects
|
||||
|
||||
theme:
|
||||
src: theme
|
||||
|
|
|
@ -7,6 +7,7 @@ PATH={{@@ env['PATH'] @@}}
|
|||
*/5 * * * * checkmail update
|
||||
*/5 * * * * vdirsyncer sync
|
||||
*/30 * * * * savegame_backup
|
||||
30 * * * * _git_projects
|
||||
# {%@@ endif @@%} #
|
||||
|
||||
# vim: commentstring=#\ %s
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
projdir="${HOME}/Projects"
|
||||
|
||||
user="{{@@ mail.personal.user @@}}"
|
||||
host="git.{{@@ mail.personal.mail @@}}"
|
||||
|
||||
#{%@@ if False @@%}#
|
||||
user="$USER"
|
||||
host="github.com"
|
||||
#{%@@ endif @@%}#
|
||||
|
||||
if ! git -C "$projdir" rev-parse > /dev/null
|
||||
then
|
||||
git clone "ssh://git@${host}:${user}/projects" "$projdir"
|
||||
|
||||
cd "$projdir"
|
||||
|
||||
git submodule update --init --recursive
|
||||
fi
|
||||
|
||||
cd "$projdir"
|
||||
|
||||
git submodule foreach --recursive sh -c 'git pull &'
|
Reference in New Issue