diff options
Diffstat (limited to 'lib/_ak_fs')
| -rwxr-xr-x | lib/_ak_fs | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -18,8 +18,9 @@ ### along with this program. If not, see <http://www.gnu.org/licenses/>. ### -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_hash_exchange +source $AK_LIBDIR/_ak_lib_load +_ak_lib_load _ak_log +_ak_lib_load _ak_hash_exchange function _ak_fs_dir_init_setup(){ _ak_check_and_create_dir $AK_MAPSDIR @@ -111,6 +112,14 @@ function _ak_fs_import(){ # _ak_log_info "Storing original hash of $1 along with its name" sha512sum "$1" > $TEMPDIR/3rd_gen_map + hashgrep="$(grep -rn $(cat $TEMPDIR/3rd_gen_map | cut -d ' ' -f 1) $AK_MAPSDIR)" + if [ $? -eq 0 ] + then + map="$(basename $( echo $hashgrep | cut -d ':' -f 1 ))" + _ak_log_error "File $1 found @ $map" + echo $map + exit 0 + fi _ak_log_info "Encoding to base64" base64 $1 > file FILE="file" |
