Update update_discord.sh
Several weeks ago Discord stopped working if there were non-Latin characters in the path. So now I'm running Discord "in place"
This commit is contained in:
parent
1fa921d3f8
commit
34be7bff65
1 changed files with 11 additions and 10 deletions
|
|
@ -1,3 +1,4 @@
|
|||
sleep 5
|
||||
cd "$HOME/dev/discord_updater/"
|
||||
discord_version=`cat version.txt`
|
||||
mapfile -t skipped_versions < skipped_versions.txt
|
||||
|
|
@ -23,17 +24,17 @@ if [ -f "discord-0.0.$new_discord_version.tar.gz" ]; then
|
|||
rm -rf "$HOME/РабочийCтол/Apps/Discord"
|
||||
echo "[4dis] Unpacking the update"
|
||||
tar -xvf "discord-0.0.$new_discord_version.tar.gz"
|
||||
echo "[4dis] Copying everything to the install dir"
|
||||
cp -r -T "Discord" "$HOME/РабочийCтол/Apps/Discord"
|
||||
#echo "[4dis] Copying everything to the install dir"
|
||||
#cp -r -T "Discord" "$HOME/РабочийCтол/Apps/Discord"
|
||||
echo "[4dis] Updating version.txt with the nes version: v${new_discord_version}"
|
||||
echo $new_discord_version > version.txt
|
||||
else
|
||||
echo "[4dis] No version upgrade happened"
|
||||
if [ ! -d "$HOME/РабочийCтол/Apps/Discord" ]; then
|
||||
echo "[4dis] Copying the old version to the install dir (dunno why it was missing)"
|
||||
mkdir -p "$HOME/РабочийCтол/Apps/Discord/"
|
||||
cp -r -T "Discord" "$HOME/РабочийCтол/Apps/Discord/"
|
||||
fi
|
||||
#if [ ! -d "$HOME/РабочийCтол/Apps/Discord" ]; then
|
||||
#echo "[4dis] Copying the old version to the install dir (dunno why it was missing)"
|
||||
#mkdir -p "$HOME/РабочийCтол/Apps/Discord/"
|
||||
#cp -r -T "Discord" "$HOME/РабочийCтол/Apps/Discord/"
|
||||
#fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -42,7 +43,7 @@ echo "[4dis] Created a temp file to monitor the output: ${TEMP_FILE}"
|
|||
|
||||
|
||||
echo "[4dis] Launching Discord..."
|
||||
"$HOME/РабочийCтол/Apps/Discord/Discord" > "$TEMP_FILE" 2>&1 &
|
||||
"./Discord/Discord" > "$TEMP_FILE" 2>&1 &
|
||||
|
||||
# Get the process ID of the app
|
||||
APP_PID=$!
|
||||
|
|
@ -62,7 +63,7 @@ check_output() {
|
|||
echo $VERSION_NUMBER > "skipped_versions.txt"
|
||||
# Kill the app
|
||||
kill $APP_PID
|
||||
bash -c '/home/chaiman/dev/discord_updater/update_discord.sh'
|
||||
bash -c "$HOME/dev/discord_updater/update_discord.sh"
|
||||
break
|
||||
done
|
||||
}
|
||||
|
|
@ -85,7 +86,7 @@ check_output2() {
|
|||
echo "[4dis] Removing the temp file"
|
||||
rm "$TEMP_FILE"
|
||||
echo "[4dis] Relaunching Discord updater script. It should update now on its own"
|
||||
bash -c '/home/chaiman/dev/discord_updater/update_discord.sh'
|
||||
bash -c "$HOME/dev/discord_updater/update_discord.sh"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue