diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2022-05-06 07:46:23 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2022-05-06 07:46:23 +0300 |
commit | 01df6934a465ed046ce0af746c2d996ea383c876 (patch) | |
tree | 768ae6d6787a7813197770c9d5acfe21221ecf54 /bin/news | |
parent | 2d5df53b1aacc4e5528541cb98bfcf00dffa6c38 (diff) | |
download | arching-kaos-tools-01df6934a465ed046ce0af746c2d996ea383c876.tar.gz arching-kaos-tools-01df6934a465ed046ce0af746c2d996ea383c876.tar.bz2 arching-kaos-tools-01df6934a465ed046ce0af746c2d996ea383c876.zip |
Fixed some wrong directory and miscuttings of fieldsorigin/patchnews1
Diffstat (limited to 'bin/news')
-rwxr-xr-x | bin/news | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -29,7 +29,7 @@ tempassin(){ } create(){ tempassin $TEMP - pwd + curpath="$(pwd)" export NEWS_FILE="$(date +%Y%m%d_%H%M%S)" vi $NEWS_FILE echo "Renaming..." @@ -38,7 +38,7 @@ create(){ IPFS_FILE=$(ipfs add -q $NEWS_FILE) mv $NEWS_FILE $ZNEWSDIR/$TO_FILE sed -e 's,Qm.*,'"$IPFS_FILE"',g' $ZNEWSDIR/README - add $ZNEWSDIR/$TO_FILE + add $TO_FILE echo "Adding to git repo..." cd $ZNEWSDIR git add $TO_FILE README @@ -85,14 +85,14 @@ import(){ } add(){ tempassin - if [ -f $1 ]; then + if [ -f $ZNEWSDIR/$1 ]; then FILE="$1" echo "Adding news from " $FILE DATETIME=$(echo $FILE | cut -d - -f 1 | awk '{print $1}') - TITLE=$(head -n 1 $FILE) - FILE_IPFS_HASH=$(ipfs add -q $FILE) + TITLE=$(head -n 1 $ZNEWSDIR/$FILE) + FILE_IPFS_HASH=$(ipfs add -q $ZNEWSDIR/$FILE) FILE_SIGN_FILE=$FILE".asc" - gpg --detach-sign --sign-with $FINGERPRINT --armor --output $FILE_SIGN_FILE $FILE + gpg --detach-sign --sign-with $FINGERPRINT --armor --output $FILE_SIGN_FILE $ZNEWSDIR/$FILE FILE_SIGNATURE=$(ipfs add -q $FILE_SIGN_FILE) cat > data <<EOF { |