[util-pkg] simplify check chroot version
This commit is contained in:
parent
39839c963c
commit
f8b4696059
1 changed files with 4 additions and 7 deletions
|
@ -9,14 +9,11 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
get_chroot_pkg_version(){
|
|
||||||
echo $(cat ${work_dir}/root/.manjaro-tools)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
check_chroot_pkg_version(){
|
check_chroot_pkg_version(){
|
||||||
if [[ ${version} != $(get_chroot_pkg_version) ]];then
|
local chroot_version=$(cat ${work_dir}/root/.manjaro-tools)
|
||||||
msg "Your chroot version is outdated. please use the -c switch to recreate the chroot."
|
msg "chroot version: $chroot_version"
|
||||||
|
if [[ ${version} != $chroot_version ]];then
|
||||||
|
clean_first=true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue