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
|
||||
|
||||
|
||||
echo "NOTICE: Currently you must move & rename the installer directories to the following:"
|
||||
echo "Base Game: ${HOME}/D2"
|
||||
echo "Expansion: ${HOME}/LOD"
|
||||
echo "Then run this script with the following option:"
|
||||
echo "${0} -a"
|
||||
echo "The script will then kick off the process of grabbing debs, setting the prefix and installing the game."
|
||||
echo "User intervention is required to click through the installer setups"
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
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
|
||||
PREFIX="/home/$USER/diablo"
|
||||
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(){
|
||||
notice
|
||||
read -n 1 -p "~~~~~~ Press enter to continue ~~~~~~"
|
||||
|
||||
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
|
||||
echo -e "${D2_INSTALLER_PATH} not found, edit script and set correct path\n"
|
||||
@@ -31,6 +56,10 @@ installD2(){
|
||||
}
|
||||
|
||||
installLOD(){
|
||||
|
||||
notice
|
||||
read -n 1 -p "~~~~~~ Press enter to continue ~~~~~~"
|
||||
|
||||
LOD_INSTALLER_PATH="/home/$USER/LOD"
|
||||
|
||||
echo -e "\nInstalling Diablo II: Lord of Destruction...\n"
|
||||
@@ -91,11 +120,11 @@ getGlide(){
|
||||
}
|
||||
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): "
|
||||
read choice
|
||||
echo -n -e "\n${LGREEN}Run game now?(Y/n): ${NC}"
|
||||
read -r choice
|
||||
|
||||
if [ "${choice}" = "n" ];then
|
||||
exit 0;
|
||||
@@ -109,7 +138,7 @@ runGame(){
|
||||
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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
from time import sleep
|
||||
timer = 0.000001
|
||||
|
||||
16
mkuser.sh
16
mkuser.sh
@@ -6,14 +6,14 @@ Create_user(){
|
||||
|
||||
echo
|
||||
echo -n "Username: "
|
||||
read uname
|
||||
read -r uname
|
||||
|
||||
echo "Additional Groups: "
|
||||
echo
|
||||
echo "[1] - Arch Linux Defaults"
|
||||
echo "[2] - Void Linux Defaults"
|
||||
echo "[3] - Custom"
|
||||
read dgroups
|
||||
read -r dgroups
|
||||
|
||||
if [ "${dgroups}" = "1" ];then
|
||||
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"
|
||||
elif [ "${dgroups}" = "3" ];then
|
||||
echo -n "Enter desired groups (comma separated): "
|
||||
read custgroups
|
||||
read -r custgroups
|
||||
addgroups="${custgroups}"
|
||||
fi
|
||||
echo "${addgroups}"
|
||||
read -n 1 -p "wait"
|
||||
useradd -m -g users -G "${addgroups}" -s /bin/bash ${uname}
|
||||
read -r -n 1 -p "wait"
|
||||
useradd -m -g users -G "${addgroups}" -s /bin/bash "${uname}"
|
||||
passwd "${uname}"
|
||||
echo
|
||||
|
||||
if [ -d /home/${uname} ];then
|
||||
if [ -d /home/"${uname}" ];then
|
||||
echo "User ${uname} created"
|
||||
else
|
||||
echo "User creation failed"
|
||||
@@ -40,7 +40,7 @@ Create_user(){
|
||||
Remove_user(){
|
||||
echo
|
||||
echo -n "Username to delete: "
|
||||
read duser
|
||||
read -r duser
|
||||
|
||||
userdel ${duser}
|
||||
if [ -d /home/${duser} ];then
|
||||
@@ -59,7 +59,7 @@ main(){
|
||||
echo "[2] - Remove User"
|
||||
echo
|
||||
echo -n "Choose: "
|
||||
read choice
|
||||
read -r choice
|
||||
|
||||
|
||||
if [ "${choice}" = "1" ];then
|
||||
|
||||
Reference in New Issue
Block a user