-
Notifications
You must be signed in to change notification settings - Fork 0
/
PS4Linux_ubuntu_debian_setup.sh
80 lines (56 loc) · 1.72 KB
/
PS4Linux_ubuntu_debian_setup.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
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/sh
#first command
sleep 5
printf "running the script" #leting the user know it running the script
printf "Please find your timezone by running this command timedatectl list-timezones" #discalmer
sleep 1
sleep 3 #3 secord the script will start
read -rp "Enter the swap you want: " swap #user input
sleep 1
read -rp "Please Enter the timezone you want: " timezone #user input
sleep 1
#ask if the user want to update
sleep 1
while true; do
read -p "Do you wish to install this program/update?" yn
case $yn in
[Y]* ) sudo apt update && sudo apt-mark hold *mesa* xserver-xorg-video-amdgpu* libdrm* && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt install discord neofetch htop git ; break;;
[N]* ) break;;
* ) printf "Please answer Y or N.";;
esac
done
#make sure the number the user want is a number not a string
if [ "${swap:-0}" -eq "${swap:-1}" 2>/dev/null ]; then
printf "making swapspace"
cd /
sudo touch /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1G count=$swap status=progress
sudo chmod 0600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
printf '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
else
printf "please enter a Number" >&2 #error
exit
fi
printf "seting up the timezone"
#setup the timezone
sudo timedatectl set-timezone $timezone
sleep 1
sudo ln -sf /usr/share/zoneinfo/$timezone /etc/localtime
sleep 1
sudo timedatectl set-ntp true
sleep 1
#setting up language
printf "setting up systen language"
#fix bug where it ask for type of keybored
sleep 1
sudo dpkg-reconfigure locales
sleep 1
printf "Done" #outro
printf "script By TigerClips1" #credit
printf "PS4 will reboot in 10 secord"
sleep 10
sudo reboot
exit
#end