Skip to content

Commit

Permalink
vlc + .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
hemnstill committed Mar 8, 2024
1 parent 7eea93a commit e433962
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ _AutoinstallCreator/AutoinstallCreator*
*.old
*.md
*.log
*.ini

.idea/
.empty
Expand Down
1 change: 1 addition & 0 deletions VLC/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vlc-*/
4 changes: 4 additions & 0 deletions VLC/create_install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
"%~dp0..\.tools\busybox.exe" bash "%~dp0create_install.sh"

exit /b %errorlevel%
21 changes: 21 additions & 0 deletions VLC/create_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
dp0="$(realpath "$(dirname "$0")")"
dp0_tools="$dp0/../.tools" && source "$dp0_tools/env_tools.sh"
set -e
cd "$dp0"

latest_version=https://www.videolan.org/vlc/download-windows.html
echo Get latest version: "$latest_version" ...
latest_version_str=$($curl --silent --location "$latest_version" | "$grep" --only-matching '(?<=href=")[^\s]+win64/vlc-[^\s]+(?=-win64\.exe")' | "$grep" --only-matching '[^-]+$' | head -n1)
[[ -z "$latest_version_str" ]] && {
echo "Cannot get mirror link"
exit 1
}

download_url="https://download.videolan.org/pub/videolan/vlc/$latest_version_str/win64/vlc-$latest_version_str-win64.zip"
filename="$(basename -- "$download_url")"
echo "Downloading: $download_url ..."
$curl --location "$download_url" --remote-name

echo Extracting ...
"$p7z" x "$filename" "-o." -aoa -r

0 comments on commit e433962

Please sign in to comment.