mirror of
				https://github.com/arkenfox/user.js.git
				synced 2025-11-04 07:45:26 +01:00 
			
		
		
		
	loops forever - fuck it
This commit is contained in:
		
							
								
								
									
										29
									
								
								updater.bat
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								updater.bat
									
									
									
									
									
								
							@@ -28,39 +28,10 @@ IF /I "%~1"=="-multioverrides" (
 | 
			
		||||
IF /I "%~1"=="-merge" (
 | 
			
		||||
	SET _merge=1
 | 
			
		||||
)
 | 
			
		||||
REM case-sensitive check because we need to strip it from params
 | 
			
		||||
IF "%~1"=="-updatebatch" (
 | 
			
		||||
	SET _updateb=1
 | 
			
		||||
)
 | 
			
		||||
SHIFT
 | 
			
		||||
GOTO parse
 | 
			
		||||
:endparse
 | 
			
		||||
ECHO.
 | 
			
		||||
IF DEFINED _updateb (
 | 
			
		||||
	ECHO Checking updater version...
 | 
			
		||||
	ECHO.
 | 
			
		||||
	DEL /F "!_myname!-updated.bat" 2>nul
 | 
			
		||||
	powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/ghacksuserjs/ghacks-user.js/raw/master/updater.bat', '!_myname!-updated.bat')" >nul
 | 
			
		||||
	IF EXIST "!_myname!-updated.bat" (
 | 
			
		||||
		CLS
 | 
			
		||||
		SET "_myparams=!_myparams:-updatebatch=!"
 | 
			
		||||
		START CMD /C "!_myname!-updated.bat" !_myparams!
 | 
			
		||||
		DEL /F "!_myname!.bat" 2>nul
 | 
			
		||||
		EXIT /B
 | 
			
		||||
	) ELSE (
 | 
			
		||||
		ECHO Failed. Make sure PowerShell is allowed internet access.
 | 
			
		||||
		ECHO.
 | 
			
		||||
		PAUSE
 | 
			
		||||
		EXIT /B
 | 
			
		||||
	)
 | 
			
		||||
) ELSE (
 | 
			
		||||
	IF NOT "!_myname!"=="!_myname:-updated=X!" (
 | 
			
		||||
		CALL :begin
 | 
			
		||||
		REN "!_myname!.bat" "!_myname:-updated=!.bat"
 | 
			
		||||
		EXIT /B
 | 
			
		||||
	)
 | 
			
		||||
)
 | 
			
		||||
:begin
 | 
			
		||||
SET /A "_line=0"
 | 
			
		||||
IF NOT EXIST user.js (
 | 
			
		||||
	ECHO user.js not detected in the current directory.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user