summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Fetka <[email protected]>2013-03-10 04:51:45 (GMT)
committer Mario Fetka <[email protected]>2013-03-10 04:51:45 (GMT)
commitfc4dfbdf789448862b96db4d8cdabb770a4a72de (patch)
tree6df190cb594e409847f5bf4ca96146aecca58774
parentabd9eb5bfc37b55c537af61ab2c653564e9a3a10 (diff)
corrected purge of old files the sort of
-rw-r--r--lib/builder-targets.sh15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/builder-targets.sh b/lib/builder-targets.sh
index 9f0f9f0..e5e54ab 100644
--- a/lib/builder-targets.sh
+++ b/lib/builder-targets.sh
@@ -376,21 +376,14 @@ EOF
# third create versionrelease
for release_file_list in `cat ${file_sort_list_final}` ; do
. ${OPSI_REPOS_PRODUCT_DIR}/${PN}-${release_file_list}.cfg
- printf "%08d;${OPSI_REPOS_PRODUCT_DIR}/${PN}-${release_file_list}.cfg\n" $REV_VERSION-$REV_CREATOR_TAG$REV_RELEASE >> ${file_sort_list}
+ echo "${OPSI_REPOS_PRODUCT_DIR}/${PN}-${release_file_list}.cfg" >> ${file_sort_list}
done
-# for cfg_file in `find ${OPSI_REPOS_BASE_DIR} -name "{PN}-${VERSION}-${CREATOR_TAG}*.cfg" -print ` ; do
-# . ${cfg_file}
-# printf "%08d;$cfg_file\n" $REV_RELEASE >> ${file_list}
-# done
-# sort -n ${file_list} > ${file_sort_list}
# Delete the oldest files
log_debug "base list for calculate purge:"
- for cfg_sort_file in `tail -${limit} ${file_sort_list} | ${CMD_comm} -13 - ${file_sort_list}` ; do
-# for cfg_sort_file in `tail -${limit} ${file_sort_list}` ; do
-
- local cfg_file=`echo $cfg_sort_file | cut -f 2 -d ";"`
- . ${cfg_file}
+ for cfg_sort_file in `head -n-${limit} ${file_sort_list}` ; do
+
+ . ${cfg_sort_file}
if [ "${REV_STATUS}" != "${OPSI_REPOS_PURGE_STATUS}" ] ; then continue; fi
dir_base=`dirname ${cfg_file}`

Powered by Domaintechnik.at | Hosting - Domain - Webspace