Introduction
Introduction Statistics Contact Development Disclaimer Help
dir2meme: allow user to specify dir for listing - brcon2023-hackathons - Bitrei…
git clone git://bitreich.org/brcon2023-hackathons git://enlrupgkhuxnvlhsf6lc3fz…
Log
Files
Refs
Tags
---
commit 08ed11b8a559da2751e6e348da949d01ac4353ec
parent 514dc27e1f5c92be7292bd87a106b79f69fd026f
Author: Anders Damsgaard <[email protected]>
Date: Sat, 12 Aug 2023 18:09:22 +0200
dir2meme: allow user to specify dir for listing
Signed-off-by: Christoph Lohmann <[email protected]>
Diffstat:
M memes/dir2meme | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/memes/dir2meme b/memes/dir2meme
@@ -1,13 +1,13 @@
#!/bin/sh
-if [ $# -ne 0 ];
+if [ $# -gt 1 ];
then
- printf "usage: %s\n" "$(basename "$0")" >&2
+ printf "usage: %s [dir]\n" "$(basename "$0")" >&2
exit 1
fi
printf "meme\n"
-find . -type f \
+find ${1:-.} -maxdepth 1 -type f \
| while read -r medianame;
do
case "${medianame}" in
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.