aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-todos
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ak-todos')
-rwxr-xr-xbin/ak-todos21
1 files changed, 5 insertions, 16 deletions
diff --git a/bin/ak-todos b/bin/ak-todos
index 218feda..46b9021 100755
--- a/bin/ak-todos
+++ b/bin/ak-todos
@@ -13,22 +13,10 @@ if [ ! -d $ZTODOSDIR ]; then
else
ak-logthis "ztodosdir 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 TODOS_FILE="$(date -u +%s)"
vi $TODOS_FILE
ak-logthis "Renaming..."
@@ -83,7 +71,8 @@ import(){
exit 224
}
add(){
- tempassin
+ TEMP="$(ak-tempassin)"
+ cd $TEMP
if [ -f $1 ]; then
FILE="$1"
ak-logthis "Adding todos from $FILE"