summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Fetka <[email protected]>2013-03-10 03:38:00 (GMT)
committer Mario Fetka <[email protected]>2013-03-10 03:38:00 (GMT)
commit2bd1cb4be1ce54c3e9272e96880c122f531ef40f (patch)
tree5315c5dcadadbb861db1bef21cccc9c8002bee36
parentebf28eaccf512476e26af98fb7ae256b75505101 (diff)
delete odl version
-rw-r--r--lib/builder-targets.sh33
1 files changed, 29 insertions, 4 deletions
diff --git a/lib/builder-targets.sh b/lib/builder-targets.sh
index f492bea..b4b92fa 100644
--- a/lib/builder-targets.sh
+++ b/lib/builder-targets.sh
@@ -352,12 +352,37 @@ EOF
# Find all revision files and sort them
local file_list=${OUTPUT_DIR}/product-file-list.txt
local file_sort_list=${OUTPUT_DIR}/product-file-sort-list.txt
+ local file_sort_list_version=${OUTPUT_DIR}/product-file-sort-list-version.txt
+ local file_sort_list_release=${OUTPUT_DIR}/product-file-sort-list-release.txt
+ local file_sort_list_final=${OUTPUT_DIR}/product-file-sort-list-final.txt
rm -f ${file_list}
- 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}
+
+ # first uniq sort all cfg based on version
+ for cfg_file in `find ${OPSI_REPOS_BASE_DIR} -name "${PN}-*.cfg" -print ` ; do
+ . ${cfg_file}
+ echo $REV_VERSION >> ${file_list}
+ done
+ sort -V ${file_list} | uniq > ${file_sort_list_version}
+
+ # second uniq sort all versions based in release
+ for pkg_version in `cat ${file_sort_list_version}` ; do
+ for cfg_file_ver in ${OPSI_REPOS_BASE_DIR}/${PN}-${pkg_version}-*.cfg ; do
+ . ${cfg_file_ver}
+ echo ${pkg_version}-$REV_CREATOR_TAG$REV_RELEASE >> ${file_sort_list_release}
+ done
+ done
+ sort -V ${file_sort_list_release} | uniq > ${file_sort_list_final}
+
+ # third create versionrelease
+ for release_file_list in `cat ${file_sort_list_final}` ; do
+ . ${OPSI_REPOS_BASE_DIR}/${PN}-${release_file_list}.cfg
+ printf "%08d;$cfg_file\n" $REV_VERSION-$REV_CREATOR_TAG$REV_RELEASE >> ${file_sort_list}
done
- sort -n ${file_list} > ${file_sort_list}
+# 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:"

Powered by Domaintechnik.at | Hosting - Domain - Webspace