diff options
Diffstat (limited to 'bin/ak-categories')
-rwxr-xr-x | bin/ak-categories | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/bin/ak-categories b/bin/ak-categories index 5bc67d7..45d11ff 100755 --- a/bin/ak-categories +++ b/bin/ak-categories @@ -14,22 +14,10 @@ if [ ! -d $ZNEWSDIR ]; then else echo "znewsdir 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 - pwd + TEMP="$(ak-tempassin)" + cd $TEMP export NEWS_FILE="$(date +%Y%m%d_%H%M%S)" vi $NEWS_FILE echo "Renaming..." @@ -84,7 +72,8 @@ import(){ exit 224 } add(){ - tempassin + TEMP="$(ak-tempassin)" + cd $TEMP if [ -f $1 ]; then FILE="$1" echo "Adding news from " $FILE |