OSDN Git Service

Merge branch 'master' of https://github.com/instantos/instantOS
[instantos/instantOS.git] / install.sh
1 #!/bin/bash
2
3 # central installer script for instantOS
4 # this is deprecated
5
6 export PAPERSILENT="True"
7
8 if [ $(whoami) = "root" ] || [ $(whoami) = "manjaro" ] || [ $(whoami) = "archiso" ];; then
9     echo "user check successful"
10 else
11     echo "please run this as root"
12     exit 1
13 fi
14
15 RAW="https://raw.githubusercontent.com"
16
17 if ! grep -Eiq 'name.*(arch|manjaro)' /etc/os-release; then
18     curl -s "$RAW/instantOS/instantLOGO/master/ascii.txt"
19     echo "warning: distro unsupported"
20 fi
21
22 REALUSERS="$(ls /home/ | grep -v '+')"
23
24 # run a tool as every existing
25 # "real"(there's a human behind it) user
26
27 userrun() {
28     for i in $REALUSERS; do
29         echo "processing user $i"
30         sudo su "$i" -c "$1"
31     done
32 }
33
34 echo "installing dependencies"
35 /usr/share/instantutils/depend.sh
36
37 echo "root: installing tools"
38 /usr/share/instantutils/rootinstall.sh
39
40 instantthemes f