summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild_rootfs.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/build_rootfs.sh b/build_rootfs.sh
index 91f7efe..ff5a6a6 100755
--- a/build_rootfs.sh
+++ b/build_rootfs.sh
@@ -14,11 +14,12 @@ dst_file=$3
base=`basename $src_tar`
dir=/tmp/build.$$
files_dir=files/
-export IPKG_INSTROOT=$dir/rootfs
+instroot=$dir/rootfs
+export IPKG_INSTROOT=$instroot
unpack() {
- mkdir -p $dir/rootfs
- cat $src_tar | (cd $dir/rootfs && tar -xz)
+ mkdir -p $instroot
+ cat $src_tar | (cd $instroot && tar -xz)
}
pack() {
@@ -47,7 +48,7 @@ add_file() {
if [ "$foo" = "./etc/init.d" ]; then
echo Enabling $file
set +e
- sh $dir/rootfs/etc/rc.common $src enable
+ sh $instroot/etc/rc.common $src enable
set -e
fi
fi
@@ -63,7 +64,7 @@ add_files() {
}
unpack
-add_files $files_dir $dir/rootfs/
+add_files $files_dir $instroot
add_file $metadata $metadata_dir $dir
add_files templates/ $dir/templates/
pack