diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2022-05-06 07:55:00 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2022-05-06 07:55:00 +0300 |
commit | 87f0e0a083bb7e1978cc03a92b304ff545701ebb (patch) | |
tree | 15d78355a555aad10309c3c04a1b03be58307c6c | |
parent | 3c551c3f567a3342f3168d08eae52a97bc8b2ed6 (diff) | |
parent | 01df6934a465ed046ce0af746c2d996ea383c876 (diff) | |
download | arching-kaos-tools-87f0e0a083bb7e1978cc03a92b304ff545701ebb.tar.gz arching-kaos-tools-87f0e0a083bb7e1978cc03a92b304ff545701ebb.tar.bz2 arching-kaos-tools-87f0e0a083bb7e1978cc03a92b304ff545701ebb.zip |
fixed news module, added ipns flag on enter module
-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 { |