Skip to content

Commit 5cf94d6

Browse files
author
adrianbartyczak
committed
Change name and documentation of variables FILE_PATHS_DATABASE_DIRECTORY and DIRECTORY_PATHS_DATABASE_DIRECTORY in CONFIGURATIONS in Locatefile
1 parent 81a622c commit 5cf94d6

File tree

4 files changed

+21
-23
lines changed

4 files changed

+21
-23
lines changed

file_management/file_retrieval/locatefile/CONFIGURATIONS

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,21 @@
1111
# and is assigned the path to the current directory.
1212
#
1313

14-
# Directory of file paths files database
15-
FILE_PATHS_DATABASE_DIRECTORY="${HERE}/database/file_paths"
14+
# Database file and directory paths directories
15+
DATABASE_FILE_PATHS_DIRECTORY="${HERE}/database/file_paths"
16+
DATABASE_DIRECTORY_PATHS_DIRECTORY="${HERE}/database/directory_paths"
1617

17-
# Directory of directory paths files database
18-
DIRECTORY_PATHS_DATABASE_DIRECTORY="${HERE}/database/directory_paths"
19-
20-
# Names of files used in both databases
21-
# These file names must match the file names in FILEPATHS. Note: These files
22-
# will be searched in in the given order.
18+
# Names of files used in both database file and directory paths directories
19+
# These file names must match the file names in FILEPATHS. Note: They are
20+
# searched in the given order.
2321
DATABASE_FILE_NAMES=('home-paths' 'mount-drive-1-paths' 'mount-drive-2-paths')
2422

2523
# Paths of mounted drives containing files to be located
2624
# When a databse file or directory path begins with "{MNTPNT_PATH}/", these
2725
# paths will traversed through in place of the "{MNTPNT_PATH}" placeholder
2826
# until the file or directory is found. Database paths beginning with
29-
# "{MNTPNT_PATH}/" are created when a database file/directory output path
30-
# defined in updatedb is prefixed with one of these paths.
27+
# "{MNTPNT_PATH}/" are created when a database file path specified in
28+
# FILEPATHS is prefixed with one of these paths.
3129
MOUNTPOINT_PATHS=(
3230
'/mnt/usb1'
3331
'/mnt/usb2'

file_management/file_retrieval/locatefile/FILEPATHS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# FILEPATHS
55
#
66
# Description:
7-
# The file paths to extract to the database
7+
# The file paths to output to the database
88
#
99
# Usage note:
1010
# A file or directory path for a database is specified using the "find_out"
@@ -27,7 +27,7 @@ source "${HERE}/CONFIGURATIONS"
2727
# FILE PATHS
2828

2929
for dbFileName in "${DATABASE_FILE_NAMES[@]}"; do
30-
dest="${FILE_PATHS_DATABASE_DIRECTORY}/${dbFileName}"
30+
dest="${DATABASE_FILE_PATHS_DIRECTORY}/${dbFileName}"
3131

3232
case "${dbFileName}" in
3333
'home-paths')
@@ -64,7 +64,7 @@ done
6464
# DIRECTORY PATHS
6565

6666
for dbFileName in "${DATABASE_FILE_NAMES[@]}"; do
67-
dest="${DIRECTORY_PATHS_DATABASE_DIRECTORY}/${dbFileName}"
67+
dest="${DATABASE_DIRECTORY_PATHS_DIRECTORY}/${dbFileName}"
6868

6969
case "${dbFileName}" in
7070
'home-paths')

file_management/file_retrieval/locatefile/locatefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ MOUNTPOINT_PATHS=("${mntpntPathsTmp[@]}")
7272
# ========================================================
7373

7474
if [ "${OPT_RETURN_DIRECTORIES}" = 'true' ]; then
75-
CURRENT_DATABASE_DIRECTORY="${DIRECTORY_PATHS_DATABASE_DIRECTORY}"
75+
CURRENT_DATABASE_DIRECTORY="${DATABASE_DIRECTORY_PATHS_DIRECTORY}"
7676
else
77-
CURRENT_DATABASE_DIRECTORY="${FILE_PATHS_DATABASE_DIRECTORY}"
77+
CURRENT_DATABASE_DIRECTORY="${DATABASE_FILE_PATHS_DIRECTORY}"
7878
fi
7979

8080
for dbFileName in "${DATABASE_FILE_NAMES[@]}"

file_management/file_retrieval/locatefile/updatedb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ find_out() {
4949
# Prepare the database directories
5050
# ============================================
5151

52-
if [ ! -d "${FILE_PATHS_DATABASE_DIRECTORY}" ]; then
53-
mkdir "${FILE_PATHS_DATABASE_DIRECTORY}"
52+
if [ ! -d "${DATABASE_FILE_PATHS_DIRECTORY}" ]; then
53+
mkdir "${DATABASE_FILE_PATHS_DIRECTORY}"
5454
elif [ "${REMOVE_DATABASE_FILES_BEFORE_UPDATING_DATABASES}" = 'true' ]; then
55-
rm -Rf "${FILE_PATHS_DATABASE_DIRECTORY}"/*
55+
rm -Rf "${DATABASE_FILE_PATHS_DIRECTORY}"/*
5656
fi
5757

58-
if [ ! -d "${DIRECTORY_PATHS_DATABASE_DIRECTORY}" ]; then
59-
mkdir "${DIRECTORY_PATHS_DATABASE_DIRECTORY}"
58+
if [ ! -d "${DATABASE_DIRECTORY_PATHS_DIRECTORY}" ]; then
59+
mkdir "${DATABASE_DIRECTORY_PATHS_DIRECTORY}"
6060
elif [ "${REMOVE_DATABASE_FILES_BEFORE_UPDATING_DATABASES}" = 'true' ]; then
61-
rm -Rf "${DIRECTORY_PATHS_DATABASE_DIRECTORY}"/*
61+
rm -Rf "${DATABASE_DIRECTORY_PATHS_DIRECTORY}"/*
6262
fi
6363

6464
# ============================================
@@ -71,8 +71,8 @@ source "${HERE}/FILEPATHS"
7171
# Process the mountpoint directory paths
7272
# ============================================
7373

74-
for dbDir in "${FILE_PATHS_DATABASE_DIRECTORY}" \
75-
"${DIRECTORY_PATHS_DATABASE_DIRECTORY}"; do
74+
for dbDir in "${DATABASE_FILE_PATHS_DIRECTORY}" \
75+
"${DATABASE_DIRECTORY_PATHS_DIRECTORY}"; do
7676

7777
for dbFileName in "${DATABASE_FILE_NAMES[@]}"; do
7878
dbFile="${dbDir}/${dbFileName}"

0 commit comments

Comments
 (0)