# 19c3 # hdw - linux ; adapt local configs # root="" target="" while [ "$1" ] ; do case "$1" in -cfg) config=$2 ; shift 2 ;; -from) root=$2 ; shift 2 ;; -to) target=$2 ; shift 2 ;; *) echo "usage: $0 -cfg [full|]" exit 1 ;; esac done # read config . ./Config && [ -z "$target" ] && target=$hdw_build_dir echo "target -> $target <-" [ -z "$target" ] && exit 1 run_it() { echo "running: $@" $@ return $? } if [ "$config" = "full" ] ; then # full programm !! ;) # kernel config run_it cp $root/usr/src/linux/.config $target/usr/src/linux/.config # x11 [ -f $root/etc/X11/XF86Config* ] && \ run_it cp $root/etc/X11/XF86Config* $target/etc/X11/ [ -f $root/etc/X11/xorg.conf* ] && \ run_it cp $root/etc/X11/xorg.conf* $target/etc/X11/ # hdw config for i in profile fstab hosts host.conf HOSTNAME resolv.conf conf/ ; do run_it rm -rf $target/etc/$i run_it cp -r $root/etc/$i $target/etc done fi echo "done"