blob: 55fb69ff674197c29b772f218330460d488689d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/bash
export NEWS_FILE="$(date +%Y%m%d_%H%M%S)"
vi $NEWS_FILE
echo "Renaming..."
TITLE="$(head -n 1 $NEWS_FILE)"
TO_FILE=$NEWS_FILE-$(echo $TITLE | tr '[:upper:]' '[:lower:]' | sed -e 's/ /\_/g' )
IPFS_FILE=$(ipfs add -q $NEWS_FILE)
sed -e 's/Qm.*/'$IPFS_FILE'/' README
mv $NEWS_FILE news/$TO_FILE
echo "Adding to git repo..."
git add news/$TO_FILE
git commit -m "Added $TO_FILE with $(head -n 1 news/$TO_FILE)"
|