-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstall_sqlite.bat
42 lines (31 loc) · 1.13 KB
/
Install_sqlite.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
setlocal
REM Set the destination folder where sqlite3 will be installed
set "DEST_FOLDER=.\Employee Database\lib\sqlite\"
REM Create the destination folder if it does not exist
if not exist "%DEST_FOLDER%" (
mkdir "%DEST_FOLDER%"
)
REM Set the URL for the sqlite3 download
set "SQLITE_URL=https://www.sqlite.org/2023/sqlite-amalgamation-3420000.zip"
REM Set the temporary folder for download and extraction
set "TEMP_FOLDER=%TEMP%\sqlite_temp"
REM Create the temporary folder
if not exist "%TEMP_FOLDER%" (
mkdir "%TEMP_FOLDER%"
)
REM Download the sqlite3 zip file
echo Downloading sqlite3...
powershell -Command "Invoke-WebRequest -Uri %SQLITE_URL% -OutFile %TEMP_FOLDER%\sqlite.zip"
REM Extract the downloaded zip file
echo Extracting sqlite3...
powershell -Command "Expand-Archive -Path %TEMP_FOLDER%\sqlite.zip -DestinationPath %TEMP_FOLDER%"
REM Move the extracted files to the destination folder
echo Installing sqlite3...
move /Y "%TEMP_FOLDER%\sqlite-amalgamation-3420000\*" "%DEST_FOLDER%"
REM Clean up the temporary folder
echo Cleaning up...
rmdir /S /Q "%TEMP_FOLDER%"
echo sqlite3 installation complete.
endlocal
pause