-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreset.sh
More file actions
executable file
·37 lines (35 loc) · 1.08 KB
/
reset.sh
File metadata and controls
executable file
·37 lines (35 loc) · 1.08 KB
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
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
echo "Are you sure you want to uninstall Homebrew and some configuration files? (y/N)"
read -r yn
[ -z "$yn" ] || {
if [[ "$yn" == [yY] ]]; then
case $(uname) in
Darwin)
echo "Uninstalling Homebrew on Mac..."
/usr/bin/ruby -e "$(curl -fsSL https://github.com/Homebrew/install/master/uninstall)"
brew list | xargs brew remove --force --ignore-dependencies
brew cask list | xargs brew cask remove --force
;;
Linux)
echo "Uninstalling ohmyzsh on Linux..."
sh -c "$(curl -fsSL https://github.com/robbyrussell/oh-my-zsh/master/tools/uninstall.sh)"
;;
*)
echo "Unsupported operating system."
exit 1
;;
esac
fi
}
echo "Are you sure you want to overwrite the configuration files? (y/N)"
read -r yn
[ -z "$yn" ] || {
if [[ "$yn" == [yY] ]]; then
rm -r .gitconfig .config .tmux.conf .tmux.conf.local .zshrc .tigrc
cp akazsh/.gitconfig .gitconfig
ln -s akazsh/mytmux/.tmux.conf.local .tmux.conf.local
ln -s akazsh/mytmux/.tmux.conf .tmux.conf
ln -s akazsh/.zshrc .zshrc
ln -s akazsh/.tigrc .tigrc
fi
}