Skip to content
Permalink
Browse files

Don't even save an update.sh on osx/linux because it's not used anymore

  • Loading branch information...
UnknownShadow200 committed Sep 10, 2019
1 parent 1d93a62 commit e72eb3dd87f6a97292ba72914fbebd61fffaff5d
Showing with 2 additions and 21 deletions.
  1. +2 −21 src/Launcher.c
@@ -598,35 +598,15 @@ bool Launcher_StartGame(const String* user, const String* mppass, const String*
"echo Starting launcher again\r\n" \
"start \"ClassiCube\" \"%s\"\r\n" \
"exit\r\n"
#else
#define UPDATE_SCRIPT \
"#!/bin/bash\n" \
"echo Waiting for launcher to exit..\n" \
"echo 5..\n" \
"sleep 1\n" \
"echo 4..\n" \
"sleep 1\n" \
"echo 3..\n" \
"sleep 1\n" \
"echo 2..\n" \
"sleep 1\n" \
"echo 1..\n" \
"sleep 1\n" \
"cd $(cd -P -- \"$(dirname -- \"$0\")\" && pwd -P)\n" \
"echo Copying updated version\n" \
"mv ./ClassiCube.update \"./%s\"\n" \
"echo Starting launcher again\n" \
"\"./%s\"\n"
#endif
/* The weird 'cd' line changes current directory to the directory update.sh is in */
/* Needed because bash's current directory isn't always client's directory (e.g. on OSX) */

static void Launcher_ApplyUpdate(void) {
static const String scriptPath = String_FromConst(UPDATE_FILENAME);
char strBuffer[1024], exeBuffer[FILENAME_SIZE];
String str, exe;
ReturnCode res;

#ifdef CC_BUILD_WIN
String_InitArray(exe, exeBuffer);
res = Process_GetExePath(&exe);
if (res) { Logger_Warn(res, "getting executable path"); return; }
@@ -641,6 +621,7 @@ static void Launcher_ApplyUpdate(void) {

res = File_MarkExecutable(&scriptPath);
if (res) Logger_Warn(res, "making update script executable");
#endif

res = Updater_Start();
if (res) { Logger_Warn(res, "running updater"); return; }

0 comments on commit e72eb3d

Please sign in to comment.
You can’t perform that action at this time.