summaryrefslogtreecommitdiff
path: root/modereset
blob: 84b0d358826c9e3b000312e80dceee0b99f91e1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash

export local portagedir="/usr/portage"
export local confdir="/etc/portage"

reset_current_mode() {
	if [ -d ""$portagedir"/.git" ] ; then
		rm -rf $(find "$portagedir" -mindepth 1 | grep -v "distfiles" | grep -v "packages")
		rm ""$confdir"/make.conf"
		rm ""$confdir"/make.profile"
		rm "$confdir"
	fi
}

main () {
	reset_current_mode
}
main