diff options
author | P. J. McDermott <pjm@nac.net> | 2013-07-16 16:12:04 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-07-16 16:12:04 (EDT) |
commit | 8f06f6dc9898ea2e188e70243cb5e15548feea91 (patch) | |
tree | 0eb4fc265f81b74c53ac2c29a6b3a03d084c07cc /lib/cmd | |
parent | 856a4d0f3625281686a05dc7b51db38ec29d4138 (diff) |
include: Remove old versions of packages.
Diffstat (limited to 'lib/cmd')
-rw-r--r-- | lib/cmd/include.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/cmd/include.sh b/lib/cmd/include.sh index 44cedf1..9c1b8f0 100644 --- a/lib/cmd/include.sh +++ b/lib/cmd/include.sh @@ -58,6 +58,13 @@ cmd_include_main() pool_dist_db="${archive}/${pool_dir}/.db" pool_dist_db="${pool_dist_db}/${cmd_include_distribution}" feeds='' + if [ -f "${pool_dist_db}/version" \ + -a "x$(cat "${pool_dist_db}/version")" \ + != "x${cmd_include_version}" ]; then + # TODO: Remove ":" when cmd_remove is implemented. + : cmd_remove "${cmd_include_distribution}" \ + "${cmd_include_source}" + fi mkdir -p "${pool_dist_db}" printf '%s\n' "${cmd_include_version}" \ >"${pool_dist_db}/version" |