Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
c03ce27e by Marvin Scholz at 2025-06-28T16:23:27+00:00
contrib: diffpatch.sh: validate arguments

- - - - -


1 changed file:

- contrib/diffpatch.sh


Changes:

=====================================
contrib/diffpatch.sh
=====================================
@@ -2,4 +2,11 @@
 # create a patch file based on file extension
 # $1 folder to run the find in
 # $2 extension to use for the diff
-find $1 -name "*$2" -exec bash -c 'filepath="$1" ; dir=$(dirname "$filepath") 
; base=$(basename -s $2 "$filepath") ; diff -pur $filepath $dir/$base' -- {} $2 
\;
\ No newline at end of file
+
+if [ "$#" -ne 2 ]; then
+    echo "expected two arguments" >&2
+    echo "usage: diffpatch.sh <package_folder> 
<file_extension_between_old_new_versions>" >&2
+    exit 2
+fi
+
+find $1 -name "*$2" -exec bash -c 'filepath="$1" ; dir=$(dirname "$filepath") 
; base=$(basename -s $2 "$filepath") ; diff -pur $filepath $dir/$base' -- {} $2 
\;



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/c03ce27eec0ebbdbf3f8e14a9bedb5dd4cda977d

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/c03ce27eec0ebbdbf3f8e14a9bedb5dd4cda977d
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to