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-articles | |
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-articles')
-rwxr-xr-x | bin/ak-articles | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/bin/ak-articles b/bin/ak-articles index 1eb3056..e198712 100755 --- a/bin/ak-articles +++ b/bin/ak-articles @@ -14,21 +14,10 @@ if [ ! -d $ZARTICLESDIR ]; then else echo "zarticlesdir found" fi -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 pwd export ARTICLES_FILE="$(date +%Y%m%d_%H%M%S)" vi $ARTICLES_FILE @@ -83,8 +72,9 @@ import(){ fi exit 224 } -add(){ - tempassin +add() + TEMP="$(ak-tempassin)" + cd $TEMP if [ -f $1 ]; then FILE="$1" echo "Adding articles from " $FILE |