-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
80 lines (67 loc) · 2.21 KB
/
install.sh
File metadata and controls
80 lines (67 loc) · 2.21 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
echo "
This Repo is depricated
Please use
github.com/Pseudonymous-coders/CRI
"
exit
AUTHORS="David Smerkous and Eli Smith"
URL="https://raw.github.com/CodeBuds/Cri/master"
CBIN=/usr/bin
CLOCAL=/usr/local/bin
CTEMP=~/Downloads/.tmp
CROUTON=/mnt/stateful_partition/crouton
URLCROUTON="https://raw.githubusercontent.com/dnschneid/crouton/master/installer/crouton"
EXTENSION=/home/chronos/user/Extensions/nhbmpbdladcchdhkemlojfjdknjadhmh
user=$(whoami)
mkdir $CTEMP 2&> /dev/null
sudo chmod +x ~/Downloads/.tmp 2&> /dev/null
cd $CTEMP
printf "Welcome to the Cri installer\nDeveloped by $AUTHORS \nYou are running as $user \n"
ask() { #This is the function we call for our yes/no situations
while true; do
read -p "$1?[y/n] " REPLY </dev/tty
case "$REPLY" in
Y*|y*) return 0 ;;
N*|n*) return 1 ;;
esac
done
}
lineCount() #This is used to count the number of lines in the commands.txt file
{
wc -l < commands.txt
}
cd $CTEMP
sudo su -c "wget -q --no-check-certificate $URLCROUTON -O $CTEMP/crouton;chmod 755 crouton"
echo "Downloading...."
if [ ! -d "$CROUTON" ]; then #Installs crouton
sudo su -c "sh crouton -t xiwi,extension,e17"
else
sudo su -c "sh crouton -t xiwi,extension,e17 -u"
fi
user\n
password\n
cd $CTEMP
sudo rm rootmount*
sudo wget -q --no-check-certificate "$URL/commands/rootmount" -O rootmount #This is a crutial step to mount root
sudo chmod 755 rootmount #Into Read/write so we can modify system
if [ -d $EXTENSION ]; then
echo "Installing icons..."
cd $EXTENSION/*/ # Backup the existing icons
sudo su -c "mv icon_128.png icon_128.png.bak;
mv icon_16.png icon_16.png.bak;
wget -q https://www.dropbox.com/s/q8ga4jgwih9980a/icon_128.png?dl=1 -O icon_128.png;
wget -q https://www.dropbox.com/s/q8ga4jgwih9980a/icon_128.png?dl=1 -O icon_16.png"
fi
cd $CLOCAL
sudo cp $CTEMP/rootmount $CLOCAL
sudo chmod 755 rootmount
rootmount
printf "We just ran the command rootmount, it should have been unsuccessful, make sure you rerun the command on next boot up\n\n"
if ask "We need to reboot... Is that okay"; then
sudo reboot
else
echo "Okay, just remember to reboot and run rootmount until it says it's successful"
fi
unset CTEMP
unset CBIN