diff options
-rwxr-xr-x | libvasile | 27 | ||||
-rwxr-xr-x | resetmode | 27 | ||||
-rwxr-xr-x | vasile | 2 |
3 files changed, 28 insertions, 28 deletions
@@ -324,3 +324,30 @@ makeiso () { cleanupiso makeisoimg } + +# modechange functions + +removeportagetree() { + if [ -d ""$portagedir"/.git" ] ; then + find "$portagedir" -mindepth 1 -name "packages" -prune -o -name "distfiles" -prune -o -exec rm -rf {} \; > /dev/null 2>&1 + fi +} + +removeportageconfig() { + rm ""$confdir"/make.conf" > /dev/null 2>&1 + rm ""$confdir"/make.profile" > /dev/null 2>&1 + rm "$confdir" > /dev/null 2>&1 + rm -rf "$clonedir" > /dev/null 2>&1 +} + +resetmode () { + removeportagetree + removeportageconfig +} + +fetchportageconfig() { + pushd /opt > /dev/null 2>&1 + git clone https://gitlab.com/redcore/redcore-build.git > /dev/null 2>&1 + popd > /dev/null 2>&1 +} + diff --git a/resetmode b/resetmode deleted file mode 100755 index 6268998..0000000 --- a/resetmode +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -empty_portage_tree() { - if [ -d ""$portagedir"/.git" ] ; then - find "$portagedir" -mindepth 1 -name "packages" -prune -o -name "distfiles" -prune -o -exec rm -rf {} \; > /dev/null 2>&1 - fi -} - -reset_portage_config() { - rm ""$confdir"/make.conf" - rm ""$confdir"/make.profile" - rm "$confdir" - rm -rf "$clonedir" -} - -fetch_portage_config() { - pushd /opt > /dev/null 2>&1 - git clone https://gitlab.com/redcore/redcore-build.git > /dev/null 2>&1 - popd > /dev/null 2>&1 -} - -main () { - empty_portage_tree - reset_portage_config - fetch_portage_config -} -main @@ -24,7 +24,7 @@ case $1 in makeiso ;; --resetmode) - source /usr/share/vasile/resetmode + resetmode ;; --binmode) source /usr/share/vasile/resetmode |