diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-12-10 19:52:25 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-12-10 19:52:25 +0200 |
commit | 45e8aacd266490b84619be0f38c30bad1b475107 (patch) | |
tree | f05cf001a3b7312f9e5d55667a78918f16e510b3 /lib/_ak_fs | |
parent | feb392776913df5b1cac4c87a2616190ef0995e9 (diff) | |
download | arching-kaos-tools-45e8aacd266490b84619be0f38c30bad1b475107.tar.gz arching-kaos-tools-45e8aacd266490b84619be0f38c30bad1b475107.tar.bz2 arching-kaos-tools-45e8aacd266490b84619be0f38c30bad1b475107.zip |
Workaround for du freebsd variant
Diffstat (limited to 'lib/_ak_fs')
-rwxr-xr-x | lib/_ak_fs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -153,7 +153,7 @@ _ak_fs_import(){ # We get the SHA512 hash for the $FILE given CHECKSUM=$(sha512sum "$FILE"|awk '{print $1}') - FILE_SIZE="$(du -b $FILE | awk '{ print $1 }')" + FILE_SIZE="$( (du -b $FILE||du -A $FILE)2>/dev/null | awk '{ print $1 }')" if [ $FILE_SIZE -lt 4097 ] then cp $FILE "$TECHDIR/$(basename "$FILE")-00000000000000000000000000000000000000000000000000.chk" @@ -274,7 +274,7 @@ _ak_fs_find_depth(){ currentNode="$1" #pathToNode="$AK_LEAFSDIR/$(_ak_fs_return_hash_path $currentNode)" pathToNode="$AK_LEAFSDIR/$currentNode" - if [ -f $pathToNode ] && [ "$(du -b $pathToNode | awk '{print $1}')" == "258" ] + if [ -f $pathToNode ] && [ "$( (du -b $pathToNode||du -A $pathToNode)2>/dev/null | awk '{print $1}')" == "258" ] then fileHead="$(head -n 1 $pathToNode)" counter="$(expr $counter + 1)" |