Check-in [448855cdf0]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

SHA1 Hash:448855cdf02fa6751f022df66a21b0d74b945d53
Date: 2012-05-11 19:41:27
User: BarryK
Comment:remove option in merge2out script to create symlinks in working directory

Tags And Properties
Changes

Changes to merge2out

@@ -4,10 +4,11 @@
 #111126 fix symlink to compat-distro pkg download directory.
 #111127 make sure host linux system has 'printcols' and 'vercmp' utilities.
 #111127 also make sure target build will have 'printcols' and 'vercmp'.
 #111203 fixes for rerun of this script.
 #120503 i left some EMPTYDIRMARKER files inside /dev.
+#120512 remove option to create symlinks in working directory.
 
 [ ! -d ./woof-arch ] && exit
 [ ! -d ./woof-code ] && exit
 [ ! -d ./woof-distro ] && exit
 
@@ -131,59 +132,62 @@
 sync
 echo
 echo "Copying woof-distro/${COMPATDISTRO}/${COMPATVERSION}/*..."
 #copy any top-level files, going down...
 
-#111203 script run before, respect previous decision...
-DESTTYPE=''
-ONETOP="`find woof-distro -mindepth 1 -maxdepth 1 -type f | head -n 1`"
-[ ! "$ONETOP" ] && ONETOP="`find woof-distro/${TARGETARCH} -mindepth 1 -maxdepth 1 -type f | head -n 1`"
-[ ! "$ONETOP" ] && ONETOP="`find woof-distro/${TARGETARCH}/${COMPATDISTRO} -mindepth 1 -maxdepth 1 -type f | head -n 1`"
-[ ! "$ONETOP" ] && ONETOP="`find woof-distro/${TARGETARCH}/${COMPATDISTRO}/${COMPATVERSION} -mindepth 1 -maxdepth 1 -type f | head -n 1`"
-if [ "$ONETOP" ];then
- ONEBASE="`basename $ONETOP`"
- if [ -e ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/${ONEBASE} ];then
-  DESTTYPE='file'
-  [ -h ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/${ONEBASE} ] && DESTTYPE='symlink'
- fi
-fi
-if [ "$DESTTYPE" = "" ];then
- #111126 don't copy, more convenient if symlink, so only one instance of the file... 111129 offer choice...
- echo
- echo "Press ENTER only to copy files from woof-distro, any other char to symlink
-files back to woof-distro. Latter is a convenience for administrator, for most
-Woof users, please choose former."
- echo -n "Recommend press ENTER only: "
- read choosesymlink
-else
- choosesymlink=''
- [ "$DESTTYPE" = "symlink" ] && choosesymlink='y'
-fi
+#120512 remove this option...
+##111203 script run before, respect previous decision...
+#DESTTYPE=''
+#ONETOP="`find woof-distro -mindepth 1 -maxdepth 1 -type f | head -n 1`"
+#[ ! "$ONETOP" ] && ONETOP="`find woof-distro/${TARGETARCH} -mindepth 1 -maxdepth 1 -type f | head -n 1`"
+#[ ! "$ONETOP" ] && ONETOP="`find woof-distro/${TARGETARCH}/${COMPATDISTRO} -mindepth 1 -maxdepth 1 -type f | head -n 1`"
+#[ ! "$ONETOP" ] && ONETOP="`find woof-distro/${TARGETARCH}/${COMPATDISTRO}/${COMPATVERSION} -mindepth 1 -maxdepth 1 -type f | head -n 1`"
+#if [ "$ONETOP" ];then
+# ONEBASE="`basename $ONETOP`"
+# if [ -e ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/${ONEBASE} ];then
+#  DESTTYPE='file'
+#  [ -h ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/${ONEBASE} ] && DESTTYPE='symlink'
+# fi
+#fi
+#if [ "$DESTTYPE" = "" ];then
+# #111126 don't copy, more convenient if symlink, so only one instance of the file... 111129 offer choice...
+# echo
+# echo "Press ENTER only to copy files from woof-distro, any other char to symlink
+#files back to woof-distro. Latter is a convenience for administrator, for most
+#Woof users, please choose former."
+# echo -n "Recommend press ENTER only: "
+# read choosesymlink
+#else
+# choosesymlink=''
+# [ "$DESTTYPE" = "symlink" ] && choosesymlink='y'
+#fi
+DESTTYPE='file'
+choosesymlink=''
 
 PARENTDIR="`echo -n "$CURDIR" | rev | cut -f 1 -d '/' | rev`" #ex: woof2
 for ONETOP in `find woof-distro -mindepth 1 -maxdepth 1 -type f | tr '\n' ' '`
 do
  if [ "$choosesymlink" = "" ];then
-  cp -f $ONETOP ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/
+  cp -a -f --remove-destination $ONETOP ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/
  else
   ONENAME="`basename $ONETOP`"
   ln -snf ../${PARENTDIR}/${ONETOP} ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/${ONENAME}
  fi
 done
 for ONETOP in `find woof-distro/${TARGETARCH} -mindepth 1 -maxdepth 1 -type f | tr '\n' ' '`
 do
  if [ "$choosesymlink" = "" ];then
-  cp -f $ONETOP ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/
+  cp -f -a --remove-destination $ONETOP ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/
  else
   ONENAME="`basename $ONETOP`"
   ln -snf ../${PARENTDIR}/${ONETOP} ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/${ONENAME}
  fi
 done
 for ONETOP in `find woof-distro/${TARGETARCH}/${COMPATDISTRO} -mindepth 1 -maxdepth 1 -type f | tr '\n' ' '`
 do
  if [ "$choosesymlink" = "" ];then
-  cp -f $ONETOP ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/
+  cp -f -a --remove-destination $ONETOP ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/
  else
   ONENAME="`basename $ONETOP`"
   ln -snf ../${PARENTDIR}/${ONETOP} ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/${ONENAME}
  fi
 done
@@ -190,11 +194,11 @@
 #lowest level...
 #cp -a -f --remove-destination woof-distro/${TARGETARCH}/${COMPATDISTRO}/${COMPATVERSION}/* ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/
 for ONETOP in `find woof-distro/${TARGETARCH}/${COMPATDISTRO}/${COMPATVERSION} -mindepth 1 -maxdepth 1 -type f | tr '\n' ' '`
 do
  if [ "$choosesymlink" = "" ];then
-  cp -f $ONETOP ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/
+  cp -f -a --remove-destination $ONETOP ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/
  else
   ONENAME="`basename $ONETOP`"
   ln -snf ../${PARENTDIR}/${ONETOP} ../woof-out_${HOSTARCH}_${TARGETARCH}_${COMPATDISTRO}_${COMPATVERSION}/${ONENAME}
  fi
 done