Skip to content

Commit b9cd4dd

Browse files
committed
feat: Add installer script
The installer script will download squirrel, install scripts, and run them.
2 parents 2b5e770 + 9fbe4a1 commit b9cd4dd

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

install.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [ "$(id -u)" != 0 ]; then
6+
echo "root access required to install!"
7+
exit 1
8+
fi
9+
10+
[ ! $(which make) ] && echo "make need to be installed" && exit 1
11+
[ ! $(which curl) ] && echo "curl need to be installed" && exit 1
12+
[ ! $(which git) ] && echo "git need to be installed" && exit 1
13+
14+
echo "Info: squirrel will be installed on your system, don't use it because it can break your system packages!"
15+
16+
if [ -e ./stock-packaging ]; then
17+
cd stock-packaging
18+
git pull
19+
make install
20+
21+
else
22+
git clone https://github.com/stock-linux/stock-packaging
23+
cd stock-packaging
24+
make install
25+
26+
fi
27+
28+
cd ..
29+
30+
curl -L -o config-install.sh https://github.com/stock-linux/installer/raw/main/src/config-install.sh
31+
curl -L -o post-install.sh https://github.com/stock-linux/installer/raw/main/src/post-install.sh
32+
33+
chmod +x config-install.sh
34+
35+
./config-install.sh
36+

0 commit comments

Comments
 (0)