Add help information to invid-conv.

This commit is contained in:
2025-12-23 15:27:52 +01:00
parent 038c7e5d81
commit aede3e6ccd

View File

@@ -25,6 +25,16 @@
YT_URL="$1"
INVID_BASE="${INVID_BASE:-https://inv.nadeko.net}"
if [ $# -ne 1 ]
then
>&2 echo "Usage: $0 <url>"
exit 1
elif [ "$1" = "-h" ]
then
echo "Usage: $0 <url>"
exit 0
fi
if [[ $YT_URL == *"youtu.be"* ]]
then
INVID_URL="${INVID_BASE}/watch?v=${YT_URL##*/}"