aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos.K <freedomrfox@gmail.com>2017-06-05 12:09:38 +0300
committerChristos.K <freedomrfox@gmail.com>2017-06-05 12:09:38 +0300
commitf5bc327847d994f5af82cedad63a160ffa99f751 (patch)
tree80442542902c2d120e51d895ee307c3978cd22eb /scripts
parentUpdated init_stage3_seq & fixed globals on drv_interface (diff)
downloadGSE-f5bc327847d994f5af82cedad63a160ffa99f751.tar.gz
GSE-f5bc327847d994f5af82cedad63a160ffa99f751.tar.bz2
GSE-f5bc327847d994f5af82cedad63a160ffa99f751.zip
Included Gentoo/other rdep checks
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/functions/lcreq37
1 files changed, 31 insertions, 6 deletions
diff --git a/scripts/functions/lcreq b/scripts/functions/lcreq
index 3aac9a0..745f6a5 100755
--- a/scripts/functions/lcreq
+++ b/scripts/functions/lcreq
@@ -1,7 +1,7 @@
#!/bin/bash
# THIS SCRIPT IS SOURCED AT THE BEGINING FOR CHECKING THE BUILDER'S RUNTIME DEPENDENCIES
-
+CRDPENDS=''
amiroot() {
if [[ "$1" == "0" ]]
then
@@ -10,8 +10,9 @@ amiroot() {
return 1
fi
}
-
-[[ -n $(whereis eix | awk -F ':' '{ print $2 }' | sed '/^\s*$/d') ]] \
+case "$1" in
+1)
+[[ -n $(command -v eix | awk -F ':' '{ print $2 }' | sed '/^\s*$/d') ]] \
|| { echo -e "[\e[33m*\e[0m] \e[35mPlease install eix to proceed!\e[0m" \
&& { amiroot $UID && echo -e "[\e[32m*\e[0m] Root privileges found" \
&& emerge -aq eix && echo -e "[\e[33m*\e[0m] \e[35mUpdating database\e[0m" \
@@ -19,11 +20,11 @@ amiroot() {
|| { echo -e "[\e[31m*\e[0m] Could not get root privileges" \
&& echo "Please resolve this issue and start again" && exit 1; }; }
-mapfile -t lreq < <(cat "${LOCALLG}/loc_req" | sed '/^#/ d' | sed '/^\s*$/d')
+mapfile -t lreq < <(cat "${CLOCALLG}/loc_req" | sed '/^#/ d' | sed '/^\s*$/d')
for i in "${lreq[@]}"; do
sleep 0.1
-if eix --installed $i >/dev/null 2>&1; then
+if eix --installed "$i" >/dev/null 2>&1; then
echo -e "[\e[32m*\e[0m] Searching for \e[32m$i\e[0m"
else
echo -e "[\e[31m*\e[0m] Searching for $i"
@@ -33,4 +34,28 @@ amiroot $UID && echo -e "[\e[32m*\e[0m] Root privileges found" \
|| { echo -e "[\e[31m*\e[0m] Could not get root privileges" \
&& echo "Please resolve this issue and start again" && exit 1; }
fi
-done \ No newline at end of file
+done;;
+2)
+mapfile -t lreq < <(cat "${CLOCALLG}/nogloc_req" | sed '/^#/ d' | sed '/^\s*$/d')
+
+for i in "${lreq[@]}"; do
+sleep 0.1
+if command -v "$i" >/dev/null 2>&1; then
+echo -e "[\e[32m*\e[0m] Searching for \e[32m$i\e[0m"
+else
+echo -e "[\e[31m*\e[0m] Searching for $i"
+CRDPENDS=1
+fi
+done
+[[ "${CRDPENDS}" == 1 ]] && while true; do
+ echo -e "\e[33mIf you think some of those dependencies are name missmatch or not important\e[0m"
+ echo -e "\e[33mYou can choose to continue at your own ristk\e[0m"
+ read -rp "Continue? Y/N: " ANS
+ case "${ANS}" in
+ [yY])
+ break;;
+ [nN])
+ echo "Exiting..." && sleep 1 && exit 1;;
+ esac
+done
+esac \ No newline at end of file