You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.1 KiB
29 lines
1.1 KiB
#!/bin/bash |
|
|
|
cd $ROOT_DIR |
|
DOT_FILES="lastpass weechat ssh Xauthority" |
|
for dotfile in $DOT_FILES; do conform_link "$DATA_DIR/$dotfile" ".$dotfile"; done |
|
|
|
# }}} |
|
# crontab update from file {{{ |
|
# TODO: refactor with suffix variables (or common cron values) |
|
|
|
case "$PLATFORM" in |
|
linux) |
|
#conform_link "$CONF_DIR/shell/zshenv" ".zshenv" |
|
crontab -l > $ROOT_DIR/tmp/crontab-conflict-arch |
|
cd $ROOT_DIR/$CONF_DIR/cron |
|
if [[ "$(diff ~/tmp/crontab-conflict-arch crontab-current-arch)" == "" |
|
]]; |
|
then # no difference with current backup |
|
logger "$LOG_PREFIX: crontab live settings match stored "\ |
|
"settings; no restore required" |
|
rm ~/tmp/crontab-conflict-arch |
|
else # current crontab settings in file do not match live settings |
|
crontab $ROOT_DIR/$CONF_DIR/cron/crontab-current-arch |
|
logger "$LOG_PREFIX: crontab stored settings conflict with "\ |
|
"live settings; stored settings restored. "\ |
|
"Previous settings recorded in ~/tmp/crontab-conflict-arch." |
|
fi |
|
;; |
|
|
|
|