dir2memeblob (387B)
1 #!/bin/sh 2 3 if [ $# -lt 1 ]; 4 then 5 printf "usage: %s file.meme\n" "$(basename "$0")" >&2 6 exit 1 7 fi 8 9 memefile="$1" 10 outname="${memefile%.*}" 11 outzip="${outname}.memeblob.zip" 12 [ ! -e "${memefile}" ] && sh ./dir2meme >"${memefile}" 13 if [ "$(uname)" = OpenBSD ] 14 then 15 zipflag=-f 16 fi 17 zip $zipflag "${outzip}" $(awk 'NR>1 {printf "%s ", $2}' "${memefile}") "${memefile}" 18 printf "%s\n" "${outzip}"