aboutsummaryrefslogtreecommitdiffstats
path: root/util/safemode
blob: 05ddbeafe8d14d6e0fe75b8bbbeec858baf0aa1c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash

if [ $# == 0 ] ; then 
	echo Usage: $0 on '|' $0 off
	echo on saves current addons to addons-safemode and uninstalls all of them
	echo off installs all addons in addons-safemode
	exit
fi


if [ $1 == 'on' ] ; then
	util/addons list > addons-safemode
	for a in `cat addons-safemode` ; do
		util/addons uninstall $a
	done
	exit
fi

if [ $1 == 'off' ] ; then
	for a in `cat addons-safemode` ; do
		util/addons install $a
	done
	exit
fi