OSDN Git Service

better internet check
[instantos/instantOS.git] / userinstall.sh
1 #!/usr/bin/env bash
2
3 #############################################
4 ## installs all instantOS tools            ##
5 #############################################
6
7 cd || echo "ERROR: could not go to HOME"
8 echo "installing instantOS tools"
9
10 # laptop specific stuff
11 if acpi | grep -q '.' &>/dev/null; then
12     # config file to indicate being a laptop
13     echo "device appears to be a laptop"
14     iconf -i islaptop 1
15 fi
16
17 # needed for nm-applet start
18 if lspci | grep -Eiq '(wifi|wireless)'; then
19     echo "device has wifi capabilities"
20     iconf -i haswifi 1
21     iconf -i wifiapplet 1
22 fi
23
24 # needed to disable bluetooth service
25 if lsusb | grep -iq 'bluetooth'; then
26     echo "device has bluetooth"
27     iconf -i hasbluetooth 1
28 fi
29
30 # change some behaviour like light for setting brightness
31 if iconf -r hasnvidia
32 then
33     iconf -i hasnvidia 1
34     iconf -i uselight 1
35 fi
36
37 instantmouse gen
38
39 mkdir ~/instantos
40 mkdir -p ~/.config/instantos
41
42 iconf -i userinstall 1