Fix updater URLs before someone bitches about it
/raw/master/ URLs are no longer working on my end. That's it. Yes, really.
This commit is contained in:
parent
b502317caf
commit
e8b9f72885
@ -42,7 +42,7 @@ IF DEFINED _updateb (
|
|||||||
REM Uncomment the next line and comment the powershell call for testing.
|
REM Uncomment the next line and comment the powershell call for testing.
|
||||||
REM COPY /B /V /Y "!_myname!.bat" "[updated]!_myname!.bat"
|
REM COPY /B /V /Y "!_myname!.bat" "[updated]!_myname!.bat"
|
||||||
(
|
(
|
||||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/ghacksuserjs/ghacks-user.js/raw/master/updater.bat', '[updated]!_myname!.bat')"
|
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/updater.bat', '[updated]!_myname!.bat')"
|
||||||
) >nul 2>&1
|
) >nul 2>&1
|
||||||
IF EXIST "[updated]!_myname!.bat" (
|
IF EXIST "[updated]!_myname!.bat" (
|
||||||
START /min CMD /C "[updated]!_myname!.bat" !_myparams!
|
START /min CMD /C "[updated]!_myname!.bat" !_myparams!
|
||||||
@ -123,7 +123,7 @@ IF DEFINED _log (
|
|||||||
IF EXIST user.js.new (DEL /F "user.js.new")
|
IF EXIST user.js.new (DEL /F "user.js.new")
|
||||||
CALL :message "Retrieving latest user.js file from github repository..."
|
CALL :message "Retrieving latest user.js file from github repository..."
|
||||||
(
|
(
|
||||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/ghacksuserjs/ghacks-user.js/raw/master/user.js', 'user.js.new')"
|
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js', 'user.js.new')"
|
||||||
) >nul 2>&1
|
) >nul 2>&1
|
||||||
IF EXIST user.js.new (
|
IF EXIST user.js.new (
|
||||||
IF DEFINED _multi (
|
IF DEFINED _multi (
|
||||||
@ -140,7 +140,6 @@ IF EXIST user.js.new (
|
|||||||
COPY /B /V /Y user.js.new+"user.js-overrides\*.js" user.js.new
|
COPY /B /V /Y user.js.new+"user.js-overrides\*.js" user.js.new
|
||||||
)
|
)
|
||||||
) ELSE (CALL :message "No override files found.")
|
) ELSE (CALL :message "No override files found.")
|
||||||
ECHO:
|
|
||||||
) ELSE (
|
) ELSE (
|
||||||
IF EXIST "user-overrides.js" (
|
IF EXIST "user-overrides.js" (
|
||||||
COPY /B /V /Y user.js.new+"user-overrides.js" "user.js.new"
|
COPY /B /V /Y user.js.new+"user-overrides.js" "user.js.new"
|
||||||
@ -151,7 +150,6 @@ IF EXIST user.js.new (
|
|||||||
CALL :message "user-overrides.js appended."
|
CALL :message "user-overrides.js appended."
|
||||||
)
|
)
|
||||||
) ELSE (CALL :message "user-overrides.js not found.")
|
) ELSE (CALL :message "user-overrides.js not found.")
|
||||||
ECHO:
|
|
||||||
)
|
)
|
||||||
IF EXIST user.js (
|
IF EXIST user.js (
|
||||||
FC user.js.new user.js >nul && SET "_changed=false" || SET "_changed=true"
|
FC user.js.new user.js >nul && SET "_changed=false" || SET "_changed=true"
|
||||||
@ -174,10 +172,9 @@ IF EXIST user.js.new (
|
|||||||
CALL :message "Update complete."
|
CALL :message "Update complete."
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
ECHO:
|
|
||||||
) ELSE (
|
) ELSE (
|
||||||
CALL :message "Update failed. Make sure PowerShell is allowed internet access."
|
CALL :message "Update failed. Make sure PowerShell is allowed internet access."
|
||||||
ECHO: No changes were made.
|
ECHO: No changes were made.
|
||||||
)
|
)
|
||||||
IF NOT DEFINED _log (
|
IF NOT DEFINED _log (
|
||||||
IF NOT DEFINED _ua (PAUSE)
|
IF NOT DEFINED _ua (PAUSE)
|
||||||
|
Loading…
Reference in New Issue
Block a user