From 1068b2c07a21da845de70bfad235f6fef4b54e68 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 3 May 2015 23:11:12 +0200 Subject: [PATCH] [util-pkg] simplify check chroot version --- lib/util-pkg.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index 48d3605..8844df9 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -9,14 +9,11 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -get_chroot_pkg_version(){ - echo $(cat ${work_dir}/root/.manjaro-tools) -} - - check_chroot_pkg_version(){ - if [[ ${version} != $(get_chroot_pkg_version) ]];then - msg "Your chroot version is outdated. please use the -c switch to recreate the chroot." + local chroot_version=$(cat ${work_dir}/root/.manjaro-tools) + msg "chroot version: $chroot_version" + if [[ ${version} != $chroot_version ]];then + clean_first=true fi }