#!/bin/sh

. /users/samba/grml/config.grml

echo Make new squashfs file

DATE=`date +%Y%m%d-%H%M`

# Remove old GRML
sudo rm -f "$BASE_DIR"/grml-remaster/copy-mount1/GRML/GRML
# Build new GRML in it's place.
sudo mksquashfs "$BASE_DIR"/grml-remaster/copy-mount2 "$BASE_DIR"/grml-remaster/copy-mount1/GRML/GRML
# Change to directory
cd "$BASE_DIR"/grml-remaster/copy-mount1/GRML
# this file is mode 444, as the CD was r/o.
sudo chmod 644 "$BASE_DIR"/grml-remaster/copy-mount1/GRML/md5sums
sudo chmod 644 "$BASE_DIR"/grml-remaster/copy-mount1/GRML/GRML
# Create md5sum
sudo find . -size +1 |xargs md5sum > md5sums
