blob: e3af99bf25ab36415223ebb3d8f623faddbd02e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/bash
export NEWS_FILE="$(date -u +%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 -i -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)"
|