Commit 91a220ac authored by Vladislav's avatar Vladislav

Time= variable is commented out

parent bd1d62bd
......@@ -1337,19 +1337,19 @@ stop_portwine () {
fi
EXEC_DESKTOP_NEW="${EXEC_DESKTOP//\"/}"
fi
if [[ $line =~ ^Time= ]] ; then
if [[ $line =~ ^#Time= ]] ; then
WITH_TIME="1"
TIME_CURRENT=${line//Time=/}
TIME_CURRENT=${line//#Time=/}
TIME_TOTAL=$(( TIME_CURRENT + PW_TIME_IN_GAME ))
fi
done < "$desktop_file"
if [[ $WITH_TIME != 1 ]] ; then
echo "Time=0" >> "$desktop_file"
echo "#Time=0" >> "$desktop_file"
fi
unset WITH_TIME
if [[ $portwine_exe == "$EXEC_DESKTOP_NEW" ]] ; then
sed -i '/^Time=/d' "$desktop_file"
echo "Time=$TIME_TOTAL" >> "$desktop_file"
sed -i '/^#Time=/d' "$desktop_file"
echo "#Time=$TIME_TOTAL" >> "$desktop_file"
fi
fi
fi
......
......@@ -617,15 +617,15 @@ else
while IFS= read -r line ; do
[[ $line =~ ^Exec= ]] && PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]="${line//Exec=/}"
[[ $line =~ ^Icon= ]] && PW_ICON_PATH["$AMOUNT_GENERATE_BUTTONS"]="${line//Icon=/}"
if [[ $line =~ ^Time= ]] ; then
if [[ $line =~ ^#Time= ]] ; then
WITH_TIME="1"
PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]="${line//Time=/}"
PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]="${line//#Time=/}"
fi
done < "$desktop_file"
PW_ALL_DF["$AMOUNT_GENERATE_BUTTONS"]="${desktop_file//"${PORT_WINE_PATH}"\//}"
# Чтобы новый ярлык показало первым при первом запуске, потом уже по времени
if [[ $WITH_TIME != 1 ]] ; then
echo "Time=0" >> "$desktop_file"
echo "#Time=0" >> "$desktop_file"
PW_AMOUNT_NO_TIME+=($AMOUNT_GENERATE_BUTTONS)
else
PW_AMOUNT_WITH_TIME+=($AMOUNT_GENERATE_BUTTONS)
......
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