Index: prepare-kernel.sh =================================================================== --- prepare-kernel.sh (revision 610) +++ prepare-kernel.sh (working copy) @@ -42,7 +42,7 @@ recursive_opt="" directorytype_opt="" if test x$recursive = xr; then - directorytype_opt="\( -type d -mindepth 1 \) -o" + directorytype_opt="( -type d -mindepth 1 ) -o" else recursive_opt="-maxdepth 1" fi @@ -51,13 +51,13 @@ link_makefiles_opt="-name Makefile -o" fi - if test "x$output_patch" = "x"; then + if test "x$output_patch" = "x" -a -e $linux_tree/$link_dir; then cd $linux_tree/$link_dir && find . $recursive_opt \( $directorytype_opt \ $link_makefiles_opt -name $config_file -o -name '*.[chS]' \) | while read f; do if test ! -e $xenomai_root/$target_dir/$f; then rm -Rf $f; fi - done; else true; fi && + done fi cd $xenomai_root/$target_dir &&