-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·48 lines (46 loc) · 1.44 KB
/
install.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
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
# // TODO: Add the ability to specify custom git repo
# Detect the platform (similar to $OSTYPE)
OS="$(uname)"
case $OS in
'Linux')
OS='Linux'
if [ -z $UPDATE ]; then
echo "Detected os is $OS"
echo "Running the installer" && sleep 3 && bash -c "$(curl -LsS https://github.com/casjay-dotfiles/desktops/raw/main/src/os/linux_setup.sh)"
else
echo "Detected os is $OS"
echo "Running the Updater" && sleep 3 && UPDATE=yes bash -c "$(curl -LsS https://github.com/casjay-dotfiles/desktops/raw/main/src/os/linux_setup.sh)"
fi
;;
'Darwin')
OS='Mac'
if [ -z $UPDATE ]; then
echo "Detected os is $OS"
echo "Running the installer" && sleep 3 && bash -c "$(curl -LsS https://github.com/casjay-systems/macos/raw/main/src/os/mac_setup.sh)"
else
echo "Detected os is $OS"
echo "Running the Updater" && sleep 3 && UPDATE=yes bash -c "$(curl -LsS https://github.com/casjay-systems/macos/raw/main/src/os/mac_setup.sh)"
fi
;;
'WindowsNT')
OS='Windows'
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/casjay-systems/windows/master/install.cmd'))"
;;
'FreeBSD')
OS='FreeBSD'
echo "Not Supported"
;;
'SunOS')
OS='Solaris'
echo "Not Supported"
;;
'MING*')
OS='Windows'
echo "Not Supported"
;;
'AIX') ;;
*)
echo "Unknown"
;;
esac