Changeset 130 for trunk/softsync
- Timestamp:
- Jun 20, 2017, 8:41:50 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softsync/softsync
r129 r130 1 1 #!/bin/bash 2 2 # 3 # 2014/09/09 Gabriel Moreau 3 # 2014/09/09 Gabriel Moreau <Gabriel Moreau(A)univ-grenoble-alpes.fr> - Initial release 4 # 2017/06/20 Gabriel Moreau - Trokata Integration 4 5 5 6 export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin … … 13 14 14 15 SYNOPSIS 15 $0 -a arch -n soft_name -r release_number [- v] [-h]16 $0 -a arch -n soft_name -r release_number [-o os_name] [-d] [-v] [-h] 16 17 17 18 OPTIONS … … 33 34 } 34 35 35 MyVarRSCmd="/usr/bin/ionice -c 3 /usr/bin/nice -18 /usr/bin/rsync" 36 MyVarRSOpt="--contimeout=3 --timeout=3 --bwlimit=5000 --rsync-path='/usr/bin/ionice -c 3 /usr/bin/nice -18 /usr/bin/rsync'" 36 # Default values 37 rsync_cmd='/usr/bin/ionice -c 3 /usr/bin/nice -18 /usr/bin/rsync' 38 rsync_opt="--contimeout=3 --timeout=3 --bwlimit=5000 --rsync-path='/usr/bin/ionice -c 3 /usr/bin/nice -18 /usr/bin/rsync'" 39 rsync_share='legilnx40::opt/${os_arch}' 40 dest_dir='/opt' 41 42 if [ -e "/etc/softsyncrc" ] 43 then 44 . "/etc/softsyncrc" 45 fi 37 46 38 47 # get options … … 44 53 if echo ${OPTARG} | egrep -q '^[[:digit:]]+' 45 54 then 46 export MyVarOSArch=${OPTARG}55 export os_arch=${OPTARG} 47 56 else 48 57 usage … … 82 91 83 92 d) 84 export MyVarRSOpt="${MyVarRSOpt} --delete"93 export rsync_opt="${rsync_opt} --delete" 85 94 ;; 86 95 … … 97 106 98 107 99 MyVarRSShare="legilnx40::opt/${MyVarOSArch}"100 108 soft_version_server=${soft_version} 101 109 if [ -n "${os_name}" ] … … 104 112 fi 105 113 106 [ -d " /opt/${soft_name}" ] || mkdir -p "/opt/${soft_name}"107 if eval ${ MyVarRSCmd} -avn ${MyVarRSOpt} ${MyVarRSShare}/${soft_name}/.zz-end.${soft_version_server} /opt/${soft_name}/.zz-end.${soft_version} \114 [ -d "${dest_dir}/${soft_name}" ] || mkdir -p "${dest_dir}/${soft_name}" 115 if eval ${rsync_cmd} -avn ${rsync_opt} ${rsync_share}/${soft_name}/.zz-end.${soft_version_server} ${dest_dir}/${soft_name}/.zz-end.${soft_version} \ 108 116 | /bin/grep -q ^\.zz-end 109 117 then 110 rm -f /opt/${soft_name}/.zz-end.${soft_version}118 rm -f ${dest_dir}/${soft_name}/.zz-end.${soft_version} 111 119 [ "${verbose}" == "yes" ] && \ 112 e cho ${MyVarRSCmd} -avz ${MyVarRSOpt} ${MyVarRSShare}/${soft_name}/${soft_version_server}/ /opt/${soft_name}/${soft_version}/113 if eval ${ MyVarRSCmd} -avz ${MyVarRSOpt} ${MyVarRSShare}/${soft_name}/${soft_version_server}/ /opt/${soft_name}/${soft_version}/120 eval echo ${rsync_cmd} -avz ${rsync_opt} ${rsync_share}/${soft_name}/${soft_version_server}/ ${dest_dir}/${soft_name}/${soft_version}/ 121 if eval ${rsync_cmd} -avz ${rsync_opt} ${rsync_share}/${soft_name}/${soft_version_server}/ ${dest_dir}/${soft_name}/${soft_version}/ 114 122 then 115 chmod ugo+rX /opt/${soft_name}/116 eval ${ MyVarRSCmd} -aq ${MyVarRSOpt} ${MyVarRSShare}/${soft_name}/.zz-end.${soft_version_server} /opt/${soft_name}/.zz-end.${soft_version}123 chmod ugo+rX ${dest_dir}/${soft_name}/ 124 eval ${rsync_cmd} -aq ${rsync_opt} ${rsync_share}/${soft_name}/.zz-end.${soft_version_server} ${dest_dir}/${soft_name}/.zz-end.${soft_version} 117 125 fi 118 126 fi
Note: See TracChangeset
for help on using the changeset viewer.