diff --git a/vpu.sh b/vpu.sh index b846244..c8d617b 100755 --- a/vpu.sh +++ b/vpu.sh @@ -40,7 +40,7 @@ function checkSetup() { # Check Dependencies and handle admin rights method local setAllowRestricted="XBPS_ALLOW_RESTRICTED=yes" - local checkAllowRestricted=$(cat ${repoPath}/etc/conf) + local checkAllowRestricted=$(cat ${repoPath}/etc/conf 2>/dev/null) if [ -f /usr/bin/sudo ];then @@ -100,9 +100,10 @@ function checkSetup() { if [ "${checkAllowRestricted}" != "${setAllowRestricted}" ];then echo "${setAllowRestricted}" > ${repoPath}/etc/conf - + checkAllowRestricted=$(cat ${repoPath}/etc/conf 2>/dev/null) + if [ "${checkAllowRestricted}" != "${setAllowRestricted}" ];then - printf "${LRED} Could enable restricted software building...[check failed]${NC}\n" + printf "${LRED}Could not enable restricted software building...[check failed]${NC}\n" restrictedCheck="Failed" fi @@ -188,7 +189,7 @@ case "${1}" in ${adminCmd} xbps-install -R ${repoPath}/hostdir/binpkgs ${package} ;; - install-nonfree|-inf|-inf) + install-nonfree|-inf|inf) ${repoPath}/xbps-src pkg ${package} if [ -f /usr/bin/sudo ];then adminCmd="sudo"