File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -222,11 +222,13 @@ function ingest_compat_tarball() {
222222 then
223223 echo_yellow " Compatibility layer for version ${version} , OS ${os} , and architecture ${arch} already exists!"
224224 ${cvmfs_server} transaction " ${cvmfs_repo} "
225- last_suffix=$(( ls - 1 d ${compat_layer_path} -* | tail - n 1 | xargs basename | cut - d- - f2 ) 2 > / dev/ null)
225+ # hide the last dir in the path by prepending it with a dot
226+ hidden_compat_layer_path=" $( dirname ${compat_layer_path} ) /.$( basename ${compat_layer_path} ) "
227+ last_suffix=$(( ls - 1 d ${hidden_compat_layer_path} -* | tail - n 1 | xargs basename | cut - d- - f2 ) 2 > / dev/ null)
226228 new_suffix=$(printf '%03 d\n' $((${last_suffix:- 0} + 1 )) )
227- old_layer_suffixed_path =" ${compat_layer_path } -${new_suffix} "
228- echo_yellow " Moving the existing compat layer from ${compat_layer_path} to ${old_layer_suffixed_path } ..."
229- mv ${compat_layer_path} ${old_layer_suffixed_path }
229+ old_layer_hidden_suffixed_path =" ${hidden_compat_layer_path } -${new_suffix} "
230+ echo_yellow " Moving the existing compat layer from ${compat_layer_path} to ${old_layer_hidden_suffixed_path } ..."
231+ mv ${compat_layer_path} ${old_layer_hidden_suffixed_path }
230232 tar -C " ${CVMFS_ROOT} /${cvmfs_repo} /${basedir} /" -xzf " ${tar_file} "
231233 ${cvmfs_server} publish -m " updated compat layer for ${version} , ${os} , ${arch} " " ${cvmfs_repo} "
232234 ec=$?
You can’t perform that action at this time.
0 commit comments