-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_rabbitvcs.sh
More file actions
executable file
·47 lines (38 loc) · 1.2 KB
/
install_rabbitvcs.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1.2 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
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# http://wiki.rabbitvcs.org/wiki/install/ubuntu
# Prepare package for distro
packages=()
if [[ -z "`apt list 2> /dev/null | grep rabbitvcs-core | grep installed`" ]]; then
packages=(rabbitvcs-core)
fi
if [[ -z "`apt list 2> /dev/null | grep rabbitvcs-core | grep installed`" ]]; then
packages=(rabbitvcs-cli)
fi
if command -v nautilus; then
if [[ -z "`apt list 2> /dev/null | grep rabbitvcs-nautilus | grep installed`" ]]; then
packages+=(rabbitvcs-nautilus)
fi
fi
if command -v thunar; then
if [[ -z "`apt list 2> /dev/null | grep rabbitvcs-thunar | grep installed`" ]]; then
packages+=(thunar-vcs-plugin rabbitvcs-thunar)
fi
fi
# The GEdit plugin don't seem to work on Ubuntu 22.
if command -v gedit; then
if [[ -z "`apt list 2> /dev/null | grep rabbitvcs-gedit | grep installed`" ]]; then
packages+=(rabbitvcs-gedit)
fi
fi
# Install if there are missing packages
if [ ${#packages[@]} -gt 0 ]; then
# Add ppa
sudo add-apt-repository -y ppa:rabbitvcs/ppa
# Install all packages
sudo apt install -y ${packages[@]}
# Refresh Desktop Environment
if command -v nautilus; then
pkill nautilus
fi
pkill gnome-shell
fi