#! /bin/sh # rm_kernel_tree: # rm the entire kernel tree; for use after the build(s) complete; . run_profile.txt . $base_dir/plans/commands/common.fns [ -f /etc/crucible.cfg ] && source /etc/crucible.cfg [ -f $ETC_DIR/global.cfg ] && source $ETC_DIR/global.cfg if [ "$SRC_DIR" == "" ]; then SRC_DIR="/usr/local/src" fi kernel_info # gives kernel_id, kernel_label SUT=`hostname -s` out_dir=$run_dir/logs/$SUT [ -d $out_dir ] || mkdir -p $out_dir sut_type=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/arm.*/arm/ \ -e s/s390.*/s390/ -e s/sa110/arm/ -e s/ppc64/powerpc/ -e s/parisc64/parisc/` if [ -e "$all_suts_dir/$SUT/profile.txt" ]; then sut_type=`grep ^sut_type= $all_suts_dir/$SUT/profile.txt | cut -d '=' -f 2` fi karch=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/arm.*/arm/ \ -e s/s390.*/s390/ -e s/sa110/arm/ -e s/ppc64/powerpc/ -e s/parisc64/parisc/` pwd=`/bin/pwd` src_dir="$SRC_DIR/linux-$kernel_id" # completely remove src_dir: echo "rm -rf : $src_dir" [ -d $src_dir ] && rm -rf $src_dir cd $pwd