aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.com>2021-12-18 07:59:48 +0200
committerkaotisk <kaotisk@arching-kaos.com>2021-12-18 07:59:48 +0200
commitaf5e46aa4c258a115ac2e5894a69aa8a019c3009 (patch)
tree515513c8efa19606c7b278e3478f45913f610d2d
parent73125773584e562b07e2246aa2e11838b0ce7052 (diff)
downloadarching-kaos-tools-af5e46aa4c258a115ac2e5894a69aa8a019c3009.tar.gz
arching-kaos-tools-af5e46aa4c258a115ac2e5894a69aa8a019c3009.tar.bz2
arching-kaos-tools-af5e46aa4c258a115ac2e5894a69aa8a019c3009.zip
Changed order of commands
-rwxr-xr-xnews7
1 files 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