Compare commits
3 Commits
48238e0c69
...
c82ab68762
| Author | SHA1 | Date | |
|---|---|---|---|
| c82ab68762 | |||
| 9774c9bccb | |||
| e0156f36d9 |
53
d2-setup.sh
53
d2-setup.sh
@@ -1,23 +1,48 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
echo "NOTICE: Currently you must move & rename the installer directories to the following:"
|
# Colors
|
||||||
echo "Base Game: ${HOME}/D2"
|
RED='\033[0;31m'
|
||||||
echo "Expansion: ${HOME}/LOD"
|
LRED="\033[1;31m"
|
||||||
echo "Then run this script with the following option:"
|
BLUE="\033[0;34m"
|
||||||
echo "${0} -a"
|
LBLUE="\033[1;34m"
|
||||||
echo "The script will then kick off the process of grabbing debs, setting the prefix and installing the game."
|
GREEN="\033[0;32m"
|
||||||
echo "User intervention is required to click through the installer setups"
|
LGREEN="\033[1;32m"
|
||||||
|
YELLOW="\033[1;33m"
|
||||||
|
CYAN="\033[0;36m"
|
||||||
|
LCYAN="\033[1;36m"
|
||||||
|
PURPLE="\033[0;35m"
|
||||||
|
LPURPLE="\033[1;35m"
|
||||||
|
BWHITE="\e[1m"
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Wine Prefix Environment
|
# Wine Prefix Environment
|
||||||
PREFIX="/home/$USER/diablo"
|
PREFIX="/home/$USER/diablo"
|
||||||
ARCH="win32"
|
ARCH="win32"
|
||||||
|
|
||||||
|
|
||||||
|
notice(){
|
||||||
|
echo -e "${YELLOW}NOTICE: Currently you must move & rename the installer directories to the following: ${NC}\n"
|
||||||
|
echo -e "${LCYAN}Base Game: ${HOME}/D2${NC}"
|
||||||
|
echo -e "${LCYAN}Expansion: ${HOME}/LOD${NC}"
|
||||||
|
echo -e "${YELLOW}\nThen run this script with the following option:${NC}"
|
||||||
|
echo -e "${LCYAN}${0} -a${NC}"
|
||||||
|
echo -e "${YELLOW}\nThe script will then kick off the process of grabbing debs, setting the prefix and installing the game.${NC}"
|
||||||
|
echo -e "${YELLOW}User intervention is required to click through the installer setups${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
installD2(){
|
installD2(){
|
||||||
|
notice
|
||||||
|
read -n 1 -p "~~~~~~ Press enter to continue ~~~~~~"
|
||||||
|
|
||||||
D2_INSTALLER_PATH="/home/$USER/D2"
|
D2_INSTALLER_PATH="/home/$USER/D2"
|
||||||
|
|
||||||
echo -e "\nInstalling Diablo II...\n"
|
echo -e "\n${LGREEN}Installing Diablo II...${NC}\n"
|
||||||
|
|
||||||
if [ ! -d "${D2_INSTALLER_PATH}" ];then
|
if [ ! -d "${D2_INSTALLER_PATH}" ];then
|
||||||
echo -e "${D2_INSTALLER_PATH} not found, edit script and set correct path\n"
|
echo -e "${D2_INSTALLER_PATH} not found, edit script and set correct path\n"
|
||||||
@@ -31,6 +56,10 @@ installD2(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
installLOD(){
|
installLOD(){
|
||||||
|
|
||||||
|
notice
|
||||||
|
read -n 1 -p "~~~~~~ Press enter to continue ~~~~~~"
|
||||||
|
|
||||||
LOD_INSTALLER_PATH="/home/$USER/LOD"
|
LOD_INSTALLER_PATH="/home/$USER/LOD"
|
||||||
|
|
||||||
echo -e "\nInstalling Diablo II: Lord of Destruction...\n"
|
echo -e "\nInstalling Diablo II: Lord of Destruction...\n"
|
||||||
@@ -91,11 +120,11 @@ getGlide(){
|
|||||||
}
|
}
|
||||||
runGame(){
|
runGame(){
|
||||||
|
|
||||||
cd "${PREFIX}/drive_c/"Program Files"/"Diablo II"/" || exit 1
|
cd "${PREFIX}/drive_c/Program Files/Diablo II/" || exit 1
|
||||||
|
|
||||||
|
|
||||||
echo -n -e "\nRun game now?(Y/n): "
|
echo -n -e "\n${LGREEN}Run game now?(Y/n): ${NC}"
|
||||||
read choice
|
read -r choice
|
||||||
|
|
||||||
if [ "${choice}" = "n" ];then
|
if [ "${choice}" = "n" ];then
|
||||||
exit 0;
|
exit 0;
|
||||||
@@ -109,7 +138,7 @@ runGame(){
|
|||||||
run_glide(){
|
run_glide(){
|
||||||
|
|
||||||
|
|
||||||
cd "${PREFIX}/drive_c/"Program Files"/"Diablo II"/" || exit 1
|
cd "${PREFIX}/drive_c/Program Files/Diablo II/" || exit 1
|
||||||
|
|
||||||
|
|
||||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine "glide-init.exe"
|
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine "glide-init.exe"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
timer = 0.000001
|
timer = 0.000001
|
||||||
|
|||||||
16
mkuser.sh
16
mkuser.sh
@@ -6,14 +6,14 @@ Create_user(){
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo -n "Username: "
|
echo -n "Username: "
|
||||||
read uname
|
read -r uname
|
||||||
|
|
||||||
echo "Additional Groups: "
|
echo "Additional Groups: "
|
||||||
echo
|
echo
|
||||||
echo "[1] - Arch Linux Defaults"
|
echo "[1] - Arch Linux Defaults"
|
||||||
echo "[2] - Void Linux Defaults"
|
echo "[2] - Void Linux Defaults"
|
||||||
echo "[3] - Custom"
|
echo "[3] - Custom"
|
||||||
read dgroups
|
read -r dgroups
|
||||||
|
|
||||||
if [ "${dgroups}" = "1" ];then
|
if [ "${dgroups}" = "1" ];then
|
||||||
addgroups="power, wheel, optical network, video, audio, storage"
|
addgroups="power, wheel, optical network, video, audio, storage"
|
||||||
@@ -21,16 +21,16 @@ Create_user(){
|
|||||||
addgroups="disk,wheel,storage,audio,video,optical,lp,network,dbus,xbuilder"
|
addgroups="disk,wheel,storage,audio,video,optical,lp,network,dbus,xbuilder"
|
||||||
elif [ "${dgroups}" = "3" ];then
|
elif [ "${dgroups}" = "3" ];then
|
||||||
echo -n "Enter desired groups (comma separated): "
|
echo -n "Enter desired groups (comma separated): "
|
||||||
read custgroups
|
read -r custgroups
|
||||||
addgroups="${custgroups}"
|
addgroups="${custgroups}"
|
||||||
fi
|
fi
|
||||||
echo "${addgroups}"
|
echo "${addgroups}"
|
||||||
read -n 1 -p "wait"
|
read -r -n 1 -p "wait"
|
||||||
useradd -m -g users -G "${addgroups}" -s /bin/bash ${uname}
|
useradd -m -g users -G "${addgroups}" -s /bin/bash "${uname}"
|
||||||
passwd "${uname}"
|
passwd "${uname}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [ -d /home/${uname} ];then
|
if [ -d /home/"${uname}" ];then
|
||||||
echo "User ${uname} created"
|
echo "User ${uname} created"
|
||||||
else
|
else
|
||||||
echo "User creation failed"
|
echo "User creation failed"
|
||||||
@@ -40,7 +40,7 @@ Create_user(){
|
|||||||
Remove_user(){
|
Remove_user(){
|
||||||
echo
|
echo
|
||||||
echo -n "Username to delete: "
|
echo -n "Username to delete: "
|
||||||
read duser
|
read -r duser
|
||||||
|
|
||||||
userdel ${duser}
|
userdel ${duser}
|
||||||
if [ -d /home/${duser} ];then
|
if [ -d /home/${duser} ];then
|
||||||
@@ -59,7 +59,7 @@ main(){
|
|||||||
echo "[2] - Remove User"
|
echo "[2] - Remove User"
|
||||||
echo
|
echo
|
||||||
echo -n "Choose: "
|
echo -n "Choose: "
|
||||||
read choice
|
read -r choice
|
||||||
|
|
||||||
|
|
||||||
if [ "${choice}" = "1" ];then
|
if [ "${choice}" = "1" ];then
|
||||||
|
|||||||
Reference in New Issue
Block a user