Admin/cronjob/self_update
author paulson <lp15@cam.ac.uk>
Thu, 27 Jan 2022 12:25:24 +0000
changeset 75012 7483347efb4c
parent 73486 1a6637572b70
permissions -rwxr-xr-x
useful lemma integral_less
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
64148
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     1
#!/bin/bash
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     2
#
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     3
# self-update of the administrative isabelle repository
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     4
#
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     5
# Need to copy this file manually to $HOME/cronjob in order to
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     6
# avoid overwriting the running self_update by itself!
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     7
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     8
source "$HOME/.bashrc"
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     9
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    10
cd "$HOME/cronjob"
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    11
mkdir -p run log
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    12
73486
wenzelm
parents: 73485
diff changeset
    13
(
73485
3cbf041f544a more robust invocation of hg;
wenzelm
parents: 73479
diff changeset
    14
  export LANG=C
3cbf041f544a more robust invocation of hg;
wenzelm
parents: 73479
diff changeset
    15
  export HGPLAIN=
3cbf041f544a more robust invocation of hg;
wenzelm
parents: 73479
diff changeset
    16
73479
6e20976d58f5 more robust invocation of hg;
wenzelm
parents: 68650
diff changeset
    17
  "${HG:-hg}" -R isabelle pull "https://isabelle.sketis.net/repos/isabelle" || echo "self_update pull failed" >&2
6e20976d58f5 more robust invocation of hg;
wenzelm
parents: 68650
diff changeset
    18
  "${HG:-hg}" -R isabelle update -C || echo "self_update update failed" >&2
67955
f69ea1a88c1a clarified handling of stdout vs. stderr: the cronjob should normally be silent;
wenzelm
parents: 67954
diff changeset
    19
  isabelle/bin/isabelle components -a 2>&1 || echo "self_update components failed" >&2
73486
wenzelm
parents: 73485
diff changeset
    20
) > run/self_update.out