]> andersk Git - moira.git/blob - gen/warehouse.sh
Add shell script for installing the warehouse data files.
[moira.git] / gen / warehouse.sh
1 #!/bin/sh
2 #
3 #
4 DIR=/warehouse/transfers/moirausr
5 TAR_FILE=$DIR/moira.tar.Z
6
7 PATH="/etc:/bin:/usr/bin:/usr/etc:/usr/athena/etc"
8
9 # The following exit codes are defined and MUST BE CONSISTENT with the
10 # MR error codes the library uses:
11 set MR_MISSINGFILE =    47836473
12 set MR_TARERR =         47836476
13
14 cd $DIR
15
16 echo extracting $TAR_FILE
17
18 if [ ! -f $TAR_FILE ]; then
19         exit $MR_MISSINGFILE
20 fi
21
22 if zcat < $TAR_FILE | tar xvf -; then
23         echo Extract successful
24 else
25         exit $MR_TARERR
26 fi
27
28 chmod 644 username_id.*
29
30 rm -f $0
31 echo removed self
32
33 exit 0
This page took 0.036192 seconds and 5 git commands to generate.