Don't log warnings for head -cN related feed exits

This commit is contained in:
2026-04-20 16:51:17 +01:00
parent be86e12b8d
commit 856df4fd50

View File

@@ -1,11 +1,12 @@
#!/usr/bin/bash #!/usr/bin/bash
repos="/tmp/repos-$(cat /dev/urandom | base64 | tr -d '=+/' | head -c 8)" N=/dev/null
repos="/tmp/repos-$(cat /dev/urandom 2>$N | base64 2>$N | tr -d '=+/' 2>$N | head -c 8)"
if [ -d "$repos" ]; then if [ -d "$repos" ]; then
echo "Error: Temporary directory '$repos' already exists." >&2 echo "Error: Temporary directory '$repos' already exists." >&2
exit 1 exit 1
fi fi
mkdir -p "$repos" mkdir -p "$repos"
tmp_portfolio="/tmp/portfolio-$(cat /dev/urandom | base64 | tr -d '=+/' | head -c 8)" tmp_portfolio="/tmp/portfolio-$(cat /dev/urandom 2>$N | base64 2>$N | tr -d '=+/' 2>$N | head -c 8)"
if [ -d "$tmp_portfolio" ]; then if [ -d "$tmp_portfolio" ]; then
echo "Error: Temporary directory '$tmp_portfolio' already exists." >&2 echo "Error: Temporary directory '$tmp_portfolio' already exists." >&2
exit 1 exit 1