aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_fs
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-12-12 20:08:08 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-12-12 20:08:08 +0200
commit076c7d85267d927d5119c23adb2d880b3caf6f4e (patch)
treec33bca704c4036463bda3c787686d3a6623f023e /lib/_ak_fs
parent79ad51237d801df55087bf9b07d65236b9360ff1 (diff)
downloadarching-kaos-tools-076c7d85267d927d5119c23adb2d880b3caf6f4e.tar.gz
arching-kaos-tools-076c7d85267d927d5119c23adb2d880b3caf6f4e.tar.bz2
arching-kaos-tools-076c7d85267d927d5119c23adb2d880b3caf6f4e.zip
We actually need this to be the last hash, so here's a workaround
Diffstat (limited to 'lib/_ak_fs')
-rwxr-xr-xlib/_ak_fs4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/_ak_fs b/lib/_ak_fs
index dad7dec..a44b852 100755
--- a/lib/_ak_fs
+++ b/lib/_ak_fs
@@ -42,7 +42,9 @@ function _ak_fs_create_dir_for_hash(){
function _ak_fs_appendLastIfNotEven(){
if [ "$(( $(wc -l "$1" | awk '{ print $1 }') % 2))" -ne 0 ]
then
- head -n 1 "$1" >> "$1"
+ tail -n 1 "$1" >> "$1.temp"
+ cat "$1.temp" >> "$1"
+ rm $1.temp
fi
}