From 4ada83e9e34f04745a661b39ac6f9a4f05ce2a52 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 18 Jun 2022 11:07:02 +0300
Subject: [PATCH] youtube-dl wrapper script using containers.

---
 Documents/bin/youtube-dl | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100755 Documents/bin/youtube-dl

diff --git a/Documents/bin/youtube-dl b/Documents/bin/youtube-dl
new file mode 100755
index 0000000..9840281
--- /dev/null
+++ b/Documents/bin/youtube-dl
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -eu
+
+if [ "${1:-}" = "-u" ]
+then
+    exec podman image pull registry.shore.co.il/youtube-dl
+fi
+
+exec podman run \
+    -it \
+    --rm \
+    --userns keep-id \
+    -w "$PWD" \
+    -v "$PWD:$PWD" \
+    -v "$HOME/.cache:/tmp/.cache" \
+    registry.shore.co.il/youtube-dl \
+    "$@"
-- 
GitLab