le-dosvox: Replaces some occurrences of "$1" to "$USER_TO_INSTALL"

Signed-off-by: Dalmon Ian Martins de Oliveira <dimo13.c3sl.ufpr.br>
parent 12e722bf
......@@ -26,7 +26,7 @@ if [[ "$1" = "" || "$(grep $1 /etc/passwd)" = "" ]]; then
exit 1
fi
USER_TO_INSTALL=$1
USER_TO_INSTALL=$USER_TO_INSTALL
# Info message about installation process
zenity --info --title="Instalação do dosvox no linux educacional 5" \
......@@ -41,8 +41,8 @@ http://intervox.nce.ufrj.br/dosvox/"
EXITCODE=0
# Create a directory and download dosvox installer into it
mkdir /home/$1/le-dosvox
(wget --progress=bar:force -O /home/$1/le-dosvox/dv45-setup.exe \
mkdir /home/$USER_TO_INSTALL/le-dosvox
(wget --progress=bar:force -O /home/$USER_TO_INSTALL/le-dosvox/dv45-setup.exe \
"http://intervox.nce.ufrj.br/dosvox/programas/dv45-setup.exe" 2>&1 \
| zenity --title="Baixando o Dosvox" --text="Por favor aguarde"\
--progress --auto-close --auto-kill)
......@@ -64,7 +64,7 @@ zenity --info --title="ATENÇÃO" \
Porém ele ainda não foi configurado, e tu terás que fechar o dosvox \
usando Alt F4. Assim, o esse programa poderá configurar certos aspectos \
do dosvox."
gksudo -u $1 "wine /home/$1/le-dosvox/dv45-setup.exe"
gksudo -u $USER_TO_INSTALL "wine /home/$1/le-dosvox/dv45-setup.exe"
# Modify some lines on dosvox configuration file
(
......@@ -76,16 +76,16 @@ VAR5="/home/dosvox_user"
DESKTOP="Área de Trabalho"
sed -e "s/${VAR1}/${VAR2}/" -e "s/${VAR3}/${VAR3}12/" \
-e "s/${VAR4}/${VAR4}29/" \
-i /home/$1/.wine/drive_c/winvox/dosvox.ini
cp "/home/$1/$DESKTOP/Dosvox.desktop" /home/$1
mv "/home/$1/$DESKTOP/Dosvox.lnk" "/home/$1/$DESKTOP/.Dosvox.lnk" &&
sed -i "s\/${1}/\/dosvox_user/\ " /home/$1/Dosvox.desktop
cp /home/$1/.wine/drive_c/winvox/dosvox.ini \
/home/$1/.wine/drive_c/windows/dosvox.ini
-i /home/$USER_TO_INSTALL/.wine/drive_c/winvox/dosvox.ini
cp "/home/$USER_TO_INSTALL/$DESKTOP/Dosvox.desktop" /home/$1
mv "/home/$USER_TO_INSTALL/$DESKTOP/Dosvox.lnk" "/home/$1/$DESKTOP/.Dosvox.lnk" &&
sed -i "s\/${1}/\/dosvox_user/\ " /home/$USER_TO_INSTALL/Dosvox.desktop
cp /home/$USER_TO_INSTALL/.wine/drive_c/winvox/dosvox.ini \
/home/$USER_TO_INSTALL/.wine/drive_c/windows/dosvox.ini
mkdir $VAR5/Área\ de\ Trabalho
cp /home/$1/Dosvox.desktop "$VAR5/$DESKTOP"
cp -R /home/$1/.wine $VAR5
cp/home/$1/.local/share/icons/hicolor/32x32/apps/150E_dosvox.0.png \
cp /home/$USER_TO_INSTALL/Dosvox.desktop "$VAR5/$DESKTOP"
cp -R /home/$USER_TO_INSTALL/.wine $VAR5
cp/home/$USER_TO_INSTALL/.local/share/icons/hicolor/32x32/apps/150E_dosvox.0.png \
$VAR5/.local/share/icons/hicolor/32x32/apps
chown -Rf dosvox_user:dosvox_user $VAR5/.wine
chown dosvox_user:dosvox_user "$VAR5/$DESKTOP/Dosvox.desktop" ; EXITCODE=$?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment