-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwatson.sh
executable file
·37 lines (30 loc) · 1.01 KB
/
watson.sh
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
#!/bin/sh
chroot () {
#Chroot specific functions that are run from within precise when this script is called with an argument of "c"
#------------------------------------------------------------------
apt-get install -y python-software-properties
add-apt-repository -y ppa:elementary-os/stable
apt-get update
apt-get install -y elementary-desktop
apt-get install -y gtk2-engines-pixbuf
cd /usr/bin
cp startxfce4 startelementary
sed -i 's/\/etc\/xdg\/xfce4\/xinitrc $CLIENTRC $SERVERRC/\/usr\/bin\/xinit_pantheon/' startelementary
echo '#!/bin/sh
/usr/sbin/lightdm-session "gnome-session --session=pantheon"' >> xinit_pantheon
chmod +x xinit_pantheon
sudo chown root:root xinit_pantheon
}
chrome () {
sh -e crouton -t xfce,keyboard,extension
sudo enter-chroot -u root sh ~/Downloads/watson.sh c
cd /usr/local/bin
sudo cp startxfce4 startelementary
sudo sed -i 's/startxfce4/startelementary/' startelementary
sudo startelementary
echo WELCOME TO PANTHEON
}
if [ "$1" = "c" ]
then chroot
else chrome
fi