From d747677c2860326e7d673861319dcb0e2149daa4 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 3 Apr 2023 01:14:58 +0300 Subject: Fixed temporary folder creation --- bin/ak-folders | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'bin/ak-folders') diff --git a/bin/ak-folders b/bin/ak-folders index df88ca1..b30f401 100755 --- a/bin/ak-folders +++ b/bin/ak-folders @@ -10,21 +10,6 @@ if [ ! -d $ZFOLDERSDIR ]; then else ak-logthis "error $ZFOLDERSDIR not 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 - echo "$TEMPASSIN" - -} usage(){ title @@ -42,7 +27,7 @@ main(){ CRP="$2" echo "Adding $FOLDERNAME" ak-logthis "Switching to tmp folder..." - TEMPASSIN="$(tempassin)" + TEMPASSIN="$(ak-tempassin)" cd $TEMPASSIN if [ $? == 0 ]; then ak-logthis "Success" -- cgit v1.2.3