| author | ali <j.a.harlow@letterboxes.org> |
| Thu Apr 14 11:59:56 2016 +0100 (2016-04-14) | |
| changeset 467 | 4b7270fd3201 |
| parent 351 | 48b0adfe3059 |
| child 475 | 008c75a5e08d |
| permissions | -rwxr-xr-x |
1 #!/bin/sh
2 if [ $# -gt 0 ]; then
3 razor="$1"
4 else
5 razor=../src/razor
6 fi
7 check_file()
8 {
9 $razor list-files | grep -x "$1" > /dev/null
10 if [ $? -ne 0 ]; then
11 echo $1: Not in database >&2
12 exit 1
13 fi
14 if [ ! -e "$RAZOR_ROOT$1" ]; then
15 echo $1: Not in filesystem >&2
16 exit 1
17 fi
18 }
19 export RAZOR_ROOT=`mktemp -dt` || exit 1
20 $razor init || exit 1
21 export YUM_URL="file://localhost/`pwd`"
22 $razor import-yum || exit 1
23 $razor install zap || exit 1
24 $razor install --relocate /usr=/opt --relocate /etc=/opt/etc zsh || exit 1
25 check_file /etc/zsh.conf
26 check_file /usr/bin/zap
27 check_file /opt/bin/zip
28 check_file /opt/bin/zsh
29 rm -rf "$RAZOR_ROOT"