diff --git a/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade b/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade deleted file mode 100755 index 27517604..00000000 --- a/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/lua - -local site = require 'gluon.site_config' - -local ret = 1 - -for _, file in ipairs(site.legacy.version_files) do - if os.remove(file) then - ret = 0 - end -end - -os.exit(ret) diff --git a/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade-late b/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade-late deleted file mode 100755 index 1e79d821..00000000 --- a/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade-late +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/lua - -local site = require 'gluon.site_config' - - -for _, file in ipairs(site.legacy.old_files) do - os.remove(file) -end diff --git a/package/gluon-legacy/files/lib/gluon/upgrade/core/invariant/990-legacy-late b/package/gluon-legacy/files/lib/gluon/upgrade/core/invariant/990-legacy-late new file mode 100755 index 00000000..efb6b675 --- /dev/null +++ b/package/gluon-legacy/files/lib/gluon/upgrade/core/invariant/990-legacy-late @@ -0,0 +1,11 @@ +#!/usr/bin/lua + +local site = require 'gluon.site_config' +local sysconfig = require 'gluon.sysconfig' + + +if sysconfig.gluon_version == 'legacy' then + for _, file in ipairs(site.legacy.old_files) do + os.remove(file) + end +end