diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-07-25 10:34:36 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-07-25 10:34:36 +0200 |
| commit | 1c2e8586f4d9cd147bbf245194beb08de1f97701 (patch) | |
| tree | f9ace458c38e0a1a29d0e07fd1a074eb76d1599d | |
| parent | 578b88abc88697409f4885f47ef2c4754201ef7f (diff) | |
| download | dotfiles-1c2e8586f4d9cd147bbf245194beb08de1f97701.tar.gz dotfiles-1c2e8586f4d9cd147bbf245194beb08de1f97701.tar.bz2 dotfiles-1c2e8586f4d9cd147bbf245194beb08de1f97701.zip | |
Added crontab for pacman, clout and newsboat
| -rw-r--r-- | crontab/root.crontab | 5 | ||||
| -rw-r--r-- | crontab/user.crontab | 4 | ||||
| -rwxr-xr-x | install | 14 | ||||
| -rwxr-xr-x | test | 4 |
4 files changed, 25 insertions, 2 deletions
diff --git a/crontab/root.crontab b/crontab/root.crontab new file mode 100644 index 0000000..ada8721 --- /dev/null +++ b/crontab/root.crontab @@ -0,0 +1,5 @@ +# Meant to be installed as root + +* * */2 * * pacman --noconfirm -Syu >> /var/log/pacman_update.log + +# vim:ft=crontab diff --git a/crontab/user.crontab b/crontab/user.crontab new file mode 100644 index 0000000..a675e15 --- /dev/null +++ b/crontab/user.crontab @@ -0,0 +1,4 @@ +* * */1 * * . $HOME/.zprofile ; clout pull +* * */1 * * . $HOME/.zprofile ; newsboat -x reload + +# vim:ft=crontab @@ -1,5 +1,7 @@ #!/bin/sh +[ "$USER" = 'root' ] && { crontab 'crontab/root.crontab' ; exit ; } + mkdir -pv "$XDG_CONFIG_HOME" mkdir -pv "$XDG_DATA_HOME" mkdir -pv "$XDG_CACHE_HOME" @@ -30,7 +32,7 @@ link_home_files 'local' "$HOME/.local" ln -svf "$(pwd)/config/zsh/zprofile" "$HOME/.zprofile" ################################################################################ -# cacharle-sync install +# sync install ################################################################################ CACHARLE_SYNC_PATH="$HOME/cacharle-sync" @@ -39,7 +41,7 @@ CACHARLE_SYNC_PATH="$HOME/cacharle-sync" ################################################################################ # vim plug -############################################################################### +################################################################################ echo '---------------------------- INSTALL VIM PLUG ----------------------------' PLUGFILE="$XDG_DATA_HOME/vim/autoload/plug.vim" @@ -66,3 +68,11 @@ mkdir -p "$XDG_DATA_HOME/zsh" update_zsh_plugin 'https://github.com/sindresorhus/pure' update_zsh_plugin 'https://github.com/zsh-users/zsh-syntax-highlighting' update_zsh_plugin 'https://github.com/MichaelAquilina/zsh-you-should-use' + +############################################################################### +# crontab +############################################################################### + +echo '---------------------------- INSTALL CRONTAB -----------------------------' +crontab 'crontab/user.crontab' +echo 'INFO: Run this script as root if you want to install the root contab' @@ -21,4 +21,8 @@ vint -s config/vim/pluggins.vim || ret=$? flake8 --ignore F821,E501,W504,N816,E241 config/qutebrowser/config.py || ret=$? flake8 --ignore W504 config/python/startup.py || ret=$? +# CRONTAB +crontab -T crontab/root.crontab || ret=$? +crontab -T crontab/user.crontab || ret=$? + exit $ret |
