mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 10:27:00 +08:00
Compare commits
5 Commits
c8c3289c79
...
7600d07d46
Author | SHA1 | Date | |
---|---|---|---|
|
7600d07d46 | ||
|
5d6d13e623 | ||
|
500c3bdfe5 | ||
|
36fd85121b | ||
|
b31bcfe44b |
|
@ -202,10 +202,10 @@ install_crontab()
|
|||
{
|
||||
if [[ -x $(command -v crontab) ]]; then
|
||||
fmt_note "installing \"$CRON_JOB\" to crontab ..."
|
||||
if ! crontab -l 1>/dev/null 2>&1; then
|
||||
if [[ -z "$(crontab -l 2>/dev/null || true)" ]]; then
|
||||
echo "$CRON_JOB" | crontab -
|
||||
else
|
||||
( crontab -l | grep -vxF "${CRON_JOB}" | grep -v "no crontab for"; echo "$CRON_JOB" ) | crontab -
|
||||
elif !( crontab -l | grep -qxF "${CRON_JOB}"); then
|
||||
( crontab -l; echo "$CRON_JOB" ) | crontab -
|
||||
fi
|
||||
else
|
||||
fmt_warning "crontab does not exist. skipping ..."
|
||||
|
|
|
@ -85,7 +85,11 @@ parse_remote() {
|
|||
USERNAME="" # optional
|
||||
SSH_OPTIONS="" # optional
|
||||
if [[ "$RIOT_TRUST_CLIENT" == "1" ]]; then
|
||||
SSH_OPTIONS='-o ControlMaster=auto -o ControlPath=/tmp/sshcm-%C -o PermitLocalCommand=yes'
|
||||
SSH_OPTIONS='-o PermitLocalCommand=yes'
|
||||
if [[ "$(get_os_type)" != "msys" ]]; then
|
||||
test "$DFS_DRY_RUN" = "1" || mkdir -p ~/.ssh/master-socket
|
||||
SSH_OPTIONS="$SSH_OPTIONS -o ControlMaster=auto -o ControlPath=~/.ssh/master-socket/%C"
|
||||
fi
|
||||
fi
|
||||
# handle input
|
||||
local remote="$1"
|
||||
|
|
|
@ -21,6 +21,9 @@ test -f .zshrc2
|
|||
diff -q ./.ssh/authorized_keys2 ~/.ssh/authorized_keys2
|
||||
diff -q ./.eid/authorized_certificates ~/.eid/authorized_certificates
|
||||
grep -q ".zshrc2" ~/.zshrc
|
||||
if [[ -x $(command -v crontab) ]]; then
|
||||
crontab -l | grep -qxF "0 * * * * ${DOTFILES}/update.sh"
|
||||
fi
|
||||
|
||||
# check scripts and functions
|
||||
dfs version
|
||||
|
@ -38,8 +41,8 @@ test $(echo n | tools/common.sh ask_for_yN "test") = "0"
|
|||
test $(echo | tools/common.sh ask_for_yN "test") = "0"
|
||||
test $(echo | tools/common.sh ask_for_Yn "test") = "1"
|
||||
test $(DFS_QUIET=1 tools/common.sh ask_for_Yn "test") = "1"
|
||||
test "$(DFS_TRUST=1 riot time@is.impt:2222/yes@you-r.right/you@are.really.recht./ibd./try@it,another@host scp /tmp/ ./tmp -D 2>/dev/null)" = 'scp -P 12022 -o ControlMaster=auto -o ControlPath=/tmp/sshcm-%C -o PermitLocalCommand=yes -o ProxyJump=time@is.impt:2222,yes@you-r.right,you@are.really.recht.,root@ibd. -r try@it.ibd.ink:"/tmp/" "./tmp"
|
||||
scp -P 12022 -o ControlMaster=auto -o ControlPath=/tmp/sshcm-%C -o PermitLocalCommand=yes -o ForwardX11=yes -o ForwardAgent=yes -r another@host.ibd.ink:"/tmp/" "./tmp"'
|
||||
test "$(DFS_TRUST=1 riot time@is.impt:2222/yes@you-r.right/you@are.really.recht./ibd./try@it,another@host scp /tmp/ ./tmp -D 2>/dev/null)" = 'scp -P 12022 -o PermitLocalCommand=yes -o ControlMaster=auto -o ControlPath=~/.ssh/master-socket/%C -o ProxyJump=time@is.impt:2222,yes@you-r.right,you@are.really.recht.,root@ibd. -r try@it.ibd.ink:"/tmp/" "./tmp"
|
||||
scp -P 12022 -o PermitLocalCommand=yes -o ControlMaster=auto -o ControlPath=~/.ssh/master-socket/%C -o ForwardX11=yes -o ForwardAgent=yes -r another@host.ibd.ink:"/tmp/" "./tmp"'
|
||||
|
||||
# check alias
|
||||
alias p114
|
||||
|
|
Loading…
Reference in New Issue
Block a user