From af5e46aa4c258a115ac2e5894a69aa8a019c3009 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 18 Dec 2021 07:59:48 +0200 Subject: Changed order of commands --- news | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/news b/news index cbc558e..910f1cb 100755 --- a/news +++ b/news @@ -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 -- cgit v1.2.3