run-test
author Paul Crowley <paul@lshift.net>
Tue, 01 Dec 2009 09:15:10 +0000
changeset 264 cd7f901d3902
child 265 6629144cf111
permissions -rwxr-xr-x
Do something with unionfs - it works
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
264
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     1
#!/bin/sh
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     2
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     3
# Must be root to run this
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     4
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     5
set -e
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     6
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     7
PRISTINE=/var/local/cache/pristine/sid
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     8
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     9
TOPDIR=`pwd`
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    10
BACKING=$TOPDIR/build/env/backing
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    11
MOUNT=$TOPDIR/build/env/mount
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    12
mkdir -p $BACKING $MOUNT
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    13
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    14
cp -av action $BACKING
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    15
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    16
unionfs-fuse -o cow $BACKING=RW:$PRISTINE=RO $MOUNT
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    17
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    18
chroot $MOUNT ./action/go
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    19
cd $TOPDIR
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    20
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    21
umount $MOUNT
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    22
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    23
cat $BACKING/action/results
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    24
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    25
rm -rf build/env
cd7f901d3902 Do something with unionfs - it works
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    26