diff options
-rwxr-xr-x | news | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -20,11 +20,11 @@ create(){ 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'/' $ZNEWSDIR/README - add $NEWS_FILE mv $NEWS_FILE $ZNEWSDIR/$TO_FILE - echo "Adding to git repo..." cd $ZNEWSDIR + sed -e 's,Qm.*,'"$IPFS_FILE"',g' README + add $TO_FILE + echo "Adding to git repo..." git add $TO_FILE README git commit -m "Added $TO_FILE with $(head -n 1 $ZNEWSDIR/$TO_FILE)" } @@ -48,7 +48,6 @@ import(){ echo $1 } add(){ - echo $(pwd) if [ -f $1 ]; then FILE="$1" echo "Adding news from " $FILE |