diff --git a/Makefile b/Makefile index a484592..f34bb1c 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,9 @@ LIBS = \ lib/util-base.sh \ lib/util-desktop.sh \ lib/util-disk.sh \ - lib/util-menu.sh + lib/util-menu.sh \ + lib/menu-engine.sh \ + lib/util-rescue.sh LISTS = \ data/package-lists/base-openrc-manjaro \ @@ -36,6 +38,9 @@ LANG = \ data/translations/portuguese_brasil.trans \ data/translations/russian.trans \ data/translations/spanish.trans + +MENUS = \ + data/rescue.menu ICONS = \ data/manjaro-architect.png @@ -90,6 +95,7 @@ uninstall: for f in ${LIBS}; do rm -f $(DESTDIR)$(PREFIX)$(LIBDIR)/$$f; done for f in ${LISTS}; do rm -f $(DESTDIR)$(PREFIX)$(DATADIR)/package-lists/$$f; done for f in ${LANG}; do rm -f $(DESTDIR)$(PREFIX)$(DATADIR)/translations/$$f; done + for f in ${MENUS}; do rm -f $(DESTDIR)$(PREFIX)$(DATADIR)/$$f; done for f in ${ICONS}; do rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/$$f; done for f in ${LAUNCHER}; do rm -f $(DESTDIR)$(PREFIX)/share/applications/$$f; done for f in ${LIVE}; do rm -f $(DESTDIR)/etc/skel/.config/autostart/$$f; done diff --git a/bin/manjaro-architect.in b/bin/manjaro-architect.in index 17818dd..862497f 100644 --- a/bin/manjaro-architect.in +++ b/bin/manjaro-architect.in @@ -22,6 +22,8 @@ import ${LIBDIR}/util-base.sh import ${LIBDIR}/util-desktop.sh import ${LIBDIR}/util-disk.sh import ${LIBDIR}/ini_val.sh +import ${LIBDIR}/menu-engine.sh +import ${LIBDIR}/util-rescue.sh import ${DATADIR}/translations/english.trans if [[ -e /run/miso/bootmnt ]]; then @@ -31,11 +33,17 @@ if [[ -e /run/miso/bootmnt ]]; then fi # run in debug mode with -d option -[[ $1 == "-d" ]] && declare -i debug=1 +#[[ $1 == "-d" ]] && declare -i debug=1 id_system select_language mk_connection check_requirements greeting + +if ((${ARGS[rescue]})); then + TEMPLATEMENU="rescue" + show_menu rescue + return 0 +fi main_menu diff --git a/lib/util.sh b/lib/util.sh index 6a0e1f9..6388c1c 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -159,7 +159,11 @@ get_ARGS() { case "${param}" in --debug|-d) ARGS[debug]=1 - ;; + debug=1 + ;; + --rescue|-r) + ARGS[rescue]=1 + ;; --init=*) key="init" ARGS[$key]=$(getvalue) @@ -169,7 +173,7 @@ get_ARGS() { ARGS[$key]=$(getvalue) ;; --help|-h) - echo -e "usage [-d|--debug] [--ini=\"file.ini\"] [ --init=openrc ] " + echo -e "usage [-d|--debug] [-r|--rescue] [--ini=\"file.ini\"] [ --init=openrc ] " exit 0 ;; --*=*)