]> andersk Git - moira.git/blame - gen/warehouse.sh
Include MIT IDs as well.
[moira.git] / gen / warehouse.sh
CommitLineData
fc2e0831 1#!/bin/sh
2#
3#
4DIR=/warehouse/transfers/moirausr
5TAR_FILE=$DIR/moira.tar.Z
6
7PATH="/etc:/bin:/usr/bin:/usr/etc:/usr/athena/etc"
8
f4f32185 9if [ -d /var/athena ] && [ -w /var/athena ]; then
10 exec >/var/athena/moira_update.log 2>&1
11else
12 exec >/tmp/moira_update.log 2>&1
13fi
14
fc2e0831 15# The following exit codes are defined and MUST BE CONSISTENT with the
59ec8dae 16# error codes the library uses:
fc2e0831 17set MR_MISSINGFILE = 47836473
18set MR_TARERR = 47836476
19
20cd $DIR
21
22echo extracting $TAR_FILE
23
24if [ ! -f $TAR_FILE ]; then
25 exit $MR_MISSINGFILE
26fi
27
28if zcat < $TAR_FILE | tar xvf -; then
29 echo Extract successful
30else
31 exit $MR_TARERR
32fi
33
dfaa6ee5 34chmod 640 username_id.*
fc2e0831 35
36rm -f $0
37echo removed self
38
39exit 0
This page took 0.473963 seconds and 5 git commands to generate.