aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos.K <freedomrfox@gmail.com>2017-06-09 20:10:05 +0300
committerChristos.K <freedomrfox@gmail.com>2017-06-09 20:10:05 +0300
commit3643e7ff6562795a061f363c8be2a64b9c016157 (patch)
treef66a3247f74639805f88de81b94835959349f5ba
parentRecovered men_opt (diff)
downloadGSE-3643e7ff6562795a061f363c8be2a64b9c016157.tar.gz
GSE-3643e7ff6562795a061f363c8be2a64b9c016157.tar.bz2
GSE-3643e7ff6562795a061f363c8be2a64b9c016157.zip
Configured force-new & fetch-new
-rwxr-xr-xbin/gse40
1 files changed, 28 insertions, 12 deletions
diff --git a/bin/gse b/bin/gse
index 2f70f62..98cf38e 100755
--- a/bin/gse
+++ b/bin/gse
@@ -24,7 +24,7 @@ export CREL="$(grep ^NAME /etc/*release | awk -F '=' '{ print $2 }')"
export PATH=${PATH}:${CWORKDIR}/scripts/functions
source "${CWORKDIR}/scripts/functions/sinit_functions" || { echo -e "\e[32mMissing scripts\e[0m" && exit 1; }
-source "${CWORKDIR}/scripts/functions/catalyst_functions" || { echo -e "\e[32mMissing scripts\e[0m" && exit 1; }
+source "${CWORKDIR}/etc/gentoo.conf" || { echo -e "\e[32mMissing gentoo.conf\e[0m" && exit 1; }
STAT_VAR=''
@@ -39,7 +39,8 @@ shl_f() {
echo "Seems like you are not using bash"
echo "Keep in mind that all scripts from this project are written for bash interpretation"
while true; do
- read -p "Do you want to continue?: " S
+ echo "Do you want to continue?: "
+ read -p "Input :: <= " S
case ${S} in
[Yy][eE][sS]|[yY]) clear; break;;
[Nn][oO]|[nN]) echo "Exiting..."; exit;;
@@ -75,7 +76,7 @@ subterm_f() {
main_f() {
while true; do
clear; men_opt 1
- read -p "Please select an option: " SELCT
+ read -p "Input :: <= " SELCT
case ${SELCT:-6} in
I|i|1|-I|-i|-1)
# CALL BUILDER SUBMENU
@@ -106,7 +107,7 @@ main_f() {
bs_menu_f() {
clear; men_opt 5
while true; do
- read -p "Select an option: " SELCT
+ read -p "Input :: <= " SELCT
case ${SELCT:-4} in
I|i|1|-I|-i|-1)
# CALL BUILD SYSTEM SUBMENU
@@ -141,7 +142,7 @@ bs_menu_f() {
bs_f() {
clear; men_opt 6
while true; do
- read -p "Select an option: " SELCT
+ read -p "Input :: <= " SELCT
case ${SELCT:-3} in
I|i|1|-I|-i|-1)
# CALL PORTAGE SUBMENU
@@ -179,7 +180,7 @@ clear; men_opt 6
portage_men_f() {
clear; men_opt 7
while true; do
- read -p "Select an option: " SELCT
+ read -p "Input :: <= " SELCT
case ${SELCT:-5} in
I|i|1|-I|-i|-1)
# MAKE MAKE.CONF: AUTOMATIC OR GUIDED CONFIGURATION
@@ -232,7 +233,7 @@ portage_men_f() {
catalyst_f() {
clear; men_opt 10
while true; do
- read -p "Select an option: " SELCT
+ read -p "Input :: <= " SELCT
case ${SELCT:-6} in
I|i|1|-I|-i|-1)
# CONFIGURE CATALYST.CONF
@@ -280,7 +281,7 @@ catalyst_f() {
config_f() {
clear; men_opt 8
while true; do
- read -p "Select an option: " SELCT
+ read -p "Input :: <= " SELCT
case ${SELCT:-3} in
I|i|1|-I|-i|-1)
# GUIDED FSTAB EDITOR
@@ -377,7 +378,7 @@ selectdef_f() {
#same for kernel-arch-version
clear; men_opt 9
while true; do
- read -p "Select an option: " SELCT
+ read -p "Input :: <= " SELCT
case ${SELCT:-3} in
I|i|1|-I|-i|-1)
clear; echo "Documentations submenu option a)"
@@ -504,19 +505,34 @@ done
}
# STARTS MAIN LOOP FUNCTION
+popar_check_f
post_par() {
if [[ -z "$@" ]]; then
mainlp_f "MM"
else
case "$1" in
--fetch-new|-fn)
+ source "${CWORKDIR}/scripts/functions/catalyst_functions" || { echo -e "\e[32mMissing scripts\e[0m" && exit 1; }
fetch_new_f "$@"
+ get_latest_portage_f "$@"
;;
- --force-new|-sn)
- source "${CWORKDIR}/scripts/sinit" "seed" "catalyst" "s1" "s2" "s3"
+ --force-new|-fcn)
+ while true; do
+ echo -e "\e[31mForce new parameter detected\e[0m"
+ echo -e "\e[31mThis option will force everything and purge what stands in its way\e[0m"
+ echo -e "\e[31mAre you sure? Y/N \e[0m"
+ read -rp "Input :: <= " YN
+ case "${YN:-n}" in
+ [yY])
+ source "${CWORKDIR}/scripts/sinit" "seed" "catalyst" "s1" "s2" "s3" "$@"
+ break;;
+ [nN])
+ break;;
+ esac
+ done
;;
--help|-h)
- echo "Help"
+ help_f
;;
--keep|-k)
echo "Keep"