diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-24 11:32:46 +0000 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-24 11:32:46 +0000 |
commit | 8c0dc4ad41c89d3e680dea0b61ca6a539e18cc94 (patch) | |
tree | 882abba9994e00a0a0d9b89554963d3e77ef0e56 | |
parent | 5b30f5e312860994ed60a622cd9f249afb6cfa07 (diff) |
ciabot: add install script
-rwxr-xr-x | ciabot/setup/install | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ciabot/setup/install b/ciabot/setup/install new file mode 100755 index 00000000..6044e404 --- /dev/null +++ b/ciabot/setup/install @@ -0,0 +1,34 @@ +#!/bin/bash + +# Invoke this script as '/home/$username/git/dev-tools/ciabot/setup/install' or +# so, and it'll handle the update of the code from git to prod. +# +# When cloning new repos, use 'git clone --no-checkout git://gerrit.libreoffice.org/foo.git' +# +# After update, use /sbin/initctl list | grep irkerd (or loircbot), sudo /sbin/start irkerd or sudo /sbin/stop irkerd +# NOTE: it's enough to start/stop irkerd, it'll automatically start/stop loircbot as well, as they are linked. + +if [ "$(whoami)" != "ciabot" ]; then + echo "forgot 'sudo -u ciabot /bin/bash'?" + exit 1 +fi + +origin=$(dirname $0) +prefix=/home/ciabot/prod + +for i in $origin/../../../irker-cia-proxy/irker-cia-proxy.py \ + $origin/../libreoffice-bugzilla.pl \ + $origin/../libreoffice-ciabot.pl \ + $origin/../projmap.json \ + $origin/../run-libreoffice-ciabot.pl \ + $origin/../sigui-bugzilla.pl +do + to=$prefix/$(basename $i) + if ! diff -q -u $i $to; then + cat $i > $to + else + echo "$to is up to date" + fi +done + +# vim:set shiftwidth=4 softtabstop=4 expandtab: |