#!/bin/sh setglobal CWD = $[pwd] echo $(CWD##*/) # prevent running from elsewhere # see support for these vars test -f support/fw.conf && setglobal fw = 'support/fw.conf' || setglobal fw = '' test -f support/rootfs-packages.conf && setglobal rfsp = 'support/rootfs-packages.conf' || setglobal rfsp = '' test -f support/mkwall.conf && setglobal mkw = 'support/mkwall.conf' || setglobal mkw = '' proc _help { xmessage -c \ "This is a handy utility to store your woof-CE configuration. Please setup the var 'XTRA_FLG' in '_00build.conf' A tarball of your config files is made in the current dir. Be careful when restoring backups as files may have changed! PLEASE RUN THIS FROM THE COMMAND LINE! see.. _00build.conf DISTRO_PKGS_SPECS-$(DISTRO_BINARY_COMPAT)-$(DISTRO_COMPAT_VERSION) $fw $rfsp $mkw To restore a backup just extract the generated tarball in place." exit 0 } echo $(CWD##*/) | grep -q '^woof-out' || _help source ./DISTRO_SPECS 2>/dev/null source ./_00build.conf match $1 { with *h*_help } test -z $XTRA_FLG && _help # make sure the clickers are ok echo "Press Enter.." read || _help echo "Backing up ... " tar cvf z$(XTRA_FLG).tar _00build.conf \ DISTRO_PKGS_SPECS-$(DISTRO_BINARY_COMPAT)-$(DISTRO_COMPAT_VERSION) \ $fw $rfsp $mkw