We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8bae40c + 2b8e53c commit 4e86a17Copy full SHA for 4e86a17
psij-ci-setup
@@ -57,7 +57,17 @@ cron_install() {
57
echo "The following line will be installed in your crontab:"
58
echo "$LINE"
59
echo "================================================================"
60
- { crontab_list && echo "$LINE"; } | crontab -
+
61
+ CRT_CRONTAB=`crontab -l 2>&1`
62
+ if [ "$?" != "0" ]; then
63
+ if echo "$CRT_CRONTAB" | grep "no crontab for" >/dev/null 2>&1 ; then
64
+ CRT_CRONTAB=""
65
+ else
66
+ echo "Error updating crontab: $CRT_CRONTAB"
67
+ exit 2
68
+ fi
69
70
+ { echo "$CRT_CRONTAB"; echo "$LINE"; } | crontab -
71
72
declare -x | egrep -v "^declare -x (BASH_VERSINFO|DISPLAY|EUID|GROUPS|SHELLOPTS|TERM|UID|_)=" >psij-ci-env
73
}
0 commit comments