Skip to content

Instantly share code, notes, and snippets.

@codehz
Created July 22, 2019 03:49
Show Gist options
  • Save codehz/0c4aa4a7830551200f8e8f52a17112f7 to your computer and use it in GitHub Desktop.
Save codehz/0c4aa4a7830551200f8e8f52a17112f7 to your computer and use it in GitHub Desktop.
#!/bin/bash
rm -rf contents.json
temp=$(mktemp)
trap "rm -rf $temp" EXIT
find -type f | sed 's/^.\//path=/' | parallel jo | jo -a | sed 's/^/content=/' > $temp
echo "version=1" >> $temp
cat $temp | jo -p >> contents.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment