aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-reference
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-04-03 01:14:58 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-04-03 01:14:58 +0300
commitd747677c2860326e7d673861319dcb0e2149daa4 (patch)
tree640c4bbca466665eee68e4735688b3cdd4022ee3 /bin/ak-reference
parent4f8fb0a8acd5eec0caaf1087d7ecf91f9166c807 (diff)
downloadarching-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-reference')
-rwxr-xr-xbin/ak-reference20
1 files changed, 5 insertions, 15 deletions
diff --git a/bin/ak-reference b/bin/ak-reference
index e2ad2df..2484ba0 100755
--- a/bin/ak-reference
+++ b/bin/ak-reference
@@ -14,21 +14,10 @@ if [ ! -d $ZREFERENCESDIR ]; then
else
ak-logthis "zreferencesdir 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 REFERENCEFILE="$(date -u +%s)"
if [ ! -z $1 ] && [ ! -z $2 ]
@@ -95,7 +84,8 @@ import(){
exit 224
}
add(){
- tempassin
+ TEMP="$(ak-tempassin)"
+ cd $TEMP
if [ -f $1 ]; then
FILE="$1"
echo "Adding references from " $FILE