diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-04-03 01:14:58 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-04-03 01:14:58 +0300 |
commit | d747677c2860326e7d673861319dcb0e2149daa4 (patch) | |
tree | 640c4bbca466665eee68e4735688b3cdd4022ee3 /bin/ak-news | |
parent | 4f8fb0a8acd5eec0caaf1087d7ecf91f9166c807 (diff) | |
download | arching-kaos-tools-d747677c2860326e7d673861319dcb0e2149daa4.tar.gz arching-kaos-tools-d747677c2860326e7d673861319dcb0e2149daa4.tar.bz2 arching-kaos-tools-d747677c2860326e7d673861319dcb0e2149daa4.zip |
Fixed temporary folder creation
Diffstat (limited to 'bin/ak-news')
-rwxr-xr-x | bin/ak-news | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/bin/ak-news b/bin/ak-news index 1658065..812ef34 100755 --- a/bin/ak-news +++ b/bin/ak-news @@ -22,22 +22,10 @@ fi cd $ZNEWSDIR -tempassin(){ - if [ ! -z $1 ] - then - TEMPASSIN="$1" - else - TIMESTAMP="$(date -u +%s)" - TEMPASSIN="/tmp/aktmp_$TIMESTAMP" - fi - if [ ! -d $TEMPASSIN ]; then - mkdir $TEMPASSIN - fi - cd $TEMPASSIN -} - create(){ - tempassin $TEMP + TEMP="$(ak-tempassin)" + cd $TEMP + cd curpath="$(pwd)" export NEWS_FILE="$(date +%Y%m%d_%H%M%S)" vi $NEWS_FILE @@ -92,7 +80,8 @@ import(){ exit 224 } add2(){ - tempassin + TEMP="$(ak-tempassin)" + cd $TEMP if [ -f $1 ]; then FILE="$1" cp $FILE $ZNEWSDIR @@ -126,7 +115,8 @@ EOF fi } add(){ - tempassin + TEMP="$(ak-tempassin)" + cd $TEMP if [ -f $ZNEWSDIR/$1 ]; then FILE="$1" echo "Adding news from " $FILE |