aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-06-24 06:01:16 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-06-24 06:01:16 +0300
commit21c7f1852b0d2ca145d18a165d6d90c6127dc44a (patch)
treefc7f56d5bd7132b2f7c96f4cf8887b53420eb320 /lib
parenta1583cc6041ae6239bf8e32ccadd11b0b79b4c79 (diff)
downloadarching-kaos-tools-21c7f1852b0d2ca145d18a165d6d90c6127dc44a.tar.gz
arching-kaos-tools-21c7f1852b0d2ca145d18a165d6d90c6127dc44a.tar.bz2
arching-kaos-tools-21c7f1852b0d2ca145d18a165d6d90c6127dc44a.zip
refactoring
Diffstat (limited to 'lib')
-rwxr-xr-xlib/_ak_fm4
-rwxr-xr-xlib/_ak_network6
-rwxr-xr-xlib/_ak_zblock2
-rwxr-xr-xlib/_ak_zchain2
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/_ak_fm b/lib/_ak_fm
index cf1a14b..deefb6d 100755
--- a/lib/_ak_fm
+++ b/lib/_ak_fm
@@ -1,7 +1,7 @@
#!/bin/bash
_ak_fm_remove_line_from_file(){
- tempfile="$(mktemp)"
+ tempfile="$(_ak_make_temp_file)"
if [ ! -f "$2" ]
then
_ak_log_error "$2 does not exist"
@@ -23,7 +23,7 @@ _ak_fm_sort_uniq_file(){
_ak_log_info "No file to process"
else
_ak_log_info "Sorting $1..."
- tempfile="$(mktemp)"
+ tempfile="$(_ak_make_temp_file)"
cat "$1" | sort | uniq > $tempfile
cat $tempfile > $1
rm $tempfile
diff --git a/lib/_ak_network b/lib/_ak_network
index 8c40f2b..2cdec02 100755
--- a/lib/_ak_network
+++ b/lib/_ak_network
@@ -24,7 +24,7 @@ _ak_network_cjdns_scanner(){
exit 1
fi
- TEMPDIR="$(mktemp -d)"
+ TEMPDIR="$(_ak_make_temp_directory)"
AK_ZPEERSFILE="$HOME/.arching-kaos/peersFile"
cd $TEMPDIR
counter=0
@@ -112,7 +112,7 @@ _ak_network_stellar_get_asset_holders(){
}
_ak_network_scan_stellar(){
- tempdir=`mktemp -d`
+ tempdir=`_ak_make_temp_directory`
tempfile="$tempdir/tmp"
tempaddr="$tempdir/tmpaddr"
@@ -265,7 +265,7 @@ _ak_network_cjdns_connect(){
then
peersfile="$1"
else
- peersfile="$(mktemp)"
+ peersfile="$(_ak_make_temp_file)"
tmpon="yes"
curl -s "https://arching-kaos.net/files/ak_cjdns_bootstrap_peers" > $peersfile
fi
diff --git a/lib/_ak_zblock b/lib/_ak_zblock
index b9fb91a..28d7c34 100755
--- a/lib/_ak_zblock
+++ b/lib/_ak_zblock
@@ -384,7 +384,7 @@ _ak_zblock_gen_html(){
fi
fi
- arg="$(mktemp)"
+ arg="$(_ak_make_temp_file)"
_ak_zblock_show "$1" | jq > $arg
_ak_generate_html_header > zblock-$1.html
diff --git a/lib/_ak_zchain b/lib/_ak_zchain
index 87fa5cf..d6925bf 100755
--- a/lib/_ak_zchain
+++ b/lib/_ak_zchain
@@ -96,7 +96,7 @@ _ak_zchain_extract_data_cids(){
}
_ak_zchain_calculate_size(){
- temp="$(mktemp -d)"
+ temp="$(_ak_make_temp_directory)"
cd $temp
if [ ! -z $1 ] && [ -n "$1" ]
then