Skip to content

Commit

Permalink
movement of ltofunctions to mmfunctions, inclusion of migrate files s…
Browse files Browse the repository at this point in the history
…cript
  • Loading branch information
dinahhandel committed Feb 26, 2016
1 parent d12ceea commit 3463786
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 183 deletions.
2 changes: 1 addition & 1 deletion formatlto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ _usage(){
exit
}

. "${SCRIPTDIR}/ltofunctions" || { echo "Missing '${SCRIPTDIR}/ltofunctions'. Exiting." ; exit 1 ;};
. "${SCRIPTDIR}/mmfunctions" || { echo "Missing '${SCRIPTDIR}/mmfunctions'. Exiting." ; exit 1 ;};
dependencies=(mkltfs)


Expand Down
2 changes: 1 addition & 1 deletion lto2filemaker
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ _usage(){
[ "${#}" = 0 ] && _usage

SCRIPTDIR=$(dirname "${0}")
. "${SCRIPTDIR}/ltofunctions" || { echo "Missing '${SCRIPTDIR}/ltofunctions'. Exiting." ; exit 1 ;};
. "${SCRIPTDIR}/mmfunctions" || { echo "Missing '${SCRIPTDIR}/mmfunctions'. Exiting." ; exit 1 ;};

# command-line options
OPTIND=1
Expand Down
155 changes: 0 additions & 155 deletions ltofunctions

This file was deleted.

40 changes: 20 additions & 20 deletions ltoperconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
CONFIG="Y"
CONFIG_VERSION="1.0"
SCRIPTDIR=$(dirname "$0")
CONFIG_FILE="${SCRIPTDIR}/ltoper.conf"
LTO_CONFIG_FILE="${SCRIPTDIR}/ltoper.conf"
SCRIPTDIR=$(dirname "${0}")
. "${SCRIPTDIR}/ltofunctions" || { echo "Missing '${SCRIPTDIR}/ltofunctions'. Exiting." ; exit 1 ;};
. "${SCRIPTDIR}/mmfunctions" || { echo "Missing '${SCRIPTDIR}/mmfunctions'. Exiting." ; exit 1 ;};

if [ -f "${CONFIG_FILE}" ] ; then
. "${CONFIG_FILE}"
if [ -f "${LTO_CONFIG_FILE}" ] ; then
. "${LTO_CONFIG_FILE}"
else
touch "${CONFIG_FILE}"
touch "${LTO_CONFIG_FILE}"
fi

conf="
Expand Down Expand Up @@ -86,24 +86,24 @@ cb.type=cancelbutton
echo ""

# write config file
echo "#$(basename "${0}") config file" > "${CONFIG_FILE}"
echo "${config_comment}" >> "${CONFIG_FILE}"
echo "#$(basename "${0}") config file" > "${LTO_CONFIG_FILE}"
echo "${config_comment}" >> "${LTO_CONFIG_FILE}"

echo "${FILEMAKER_USER_COMMENT}" >> "${CONFIG_FILE}"
echo "FILEMAKER_USER=\"${FILEMAKER_USER}\"" >> "${CONFIG_FILE}"
echo >> "${CONFIG_FILE}"
echo "${FILEMAKER_USER_COMMENT}" >> "${LTO_CONFIG_FILE}"
echo "FILEMAKER_USER=\"${FILEMAKER_USER}\"" >> "${LTO_CONFIG_FILE}"
echo >> "${LTO_CONFIG_FILE}"

echo "${FILEMAKER_PASS_COMMENT}" >> "${CONFIG_FILE}"
echo "FILEMAKER_PASS=\"${FILEMAKER_PASS}\"" >> "${CONFIG_FILE}"
echo >> "${CONFIG_FILE}"
echo "${FILEMAKER_PASS_COMMENT}" >> "${LTO_CONFIG_FILE}"
echo "FILEMAKER_PASS=\"${FILEMAKER_PASS}\"" >> "${LTO_CONFIG_FILE}"
echo >> "${LTO_CONFIG_FILE}"

echo "${FILEMAKER_DB_COMMENT}" >> "${CONFIG_FILE}"
echo "FILEMAKER_DB=\"${FILEMAKER_DB}\"" >> "${CONFIG_FILE}"
echo >> "${CONFIG_FILE}"
echo "${FILEMAKER_DB_COMMENT}" >> "${LTO_CONFIG_FILE}"
echo "FILEMAKER_DB=\"${FILEMAKER_DB}\"" >> "${LTO_CONFIG_FILE}"
echo >> "${LTO_CONFIG_FILE}"

echo "${FILEMAKER_XML_URL_COMMENT}" >> "${CONFIG_FILE}"
echo "FILEMAKER_XML_URL=\"${FILEMAKER_XML_URL}\"" >> "${CONFIG_FILE}"
echo >> "${CONFIG_FILE}"
echo "${FILEMAKER_XML_URL_COMMENT}" >> "${LTO_CONFIG_FILE}"
echo "FILEMAKER_XML_URL=\"${FILEMAKER_XML_URL}\"" >> "${LTO_CONFIG_FILE}"
echo >> "${LTO_CONFIG_FILE}"

. "${CONFIG_FILE}"
. "${LTO_CONFIG_FILE}"
fi
4 changes: 2 additions & 2 deletions mountlto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# mountlto

SCRIPTDIR=$(dirname "${0}")
. "${SCRIPTDIR}/ltofunctions" || { echo "Missing '${SCRIPTDIR}/ltofunctions'. Exiting." ; exit 1 ;};
. "${SCRIPTDIR}/mmfunctions" || { echo "Missing '${SCRIPTDIR}/mmfunctions'. Exiting." ; exit 1 ;};


unset LTO_ARRAY
Expand Down Expand Up @@ -51,7 +51,7 @@ else
fi
echo "${GREEN}MOUNTING TAPE : THE TAPE WILL MOUNT TO THE ${RED}${MOUNT_DIR}${GREEN} FOLDER${NC}"
echo "${GREEN}MOUNTING TAPE : AFTER MOUNT PRESS ${RED}CONTROL-C${GREEN} TO EJECT${NC}"
trap _cleanup SIGHUP SIGINT SIGTERM
trap _cleanup_mount_dir SIGHUP SIGINT SIGTERM
if [ $(which ltfs_ldun) ] ; then
ltfs_ldun load ${DECK}
fi
Expand Down
2 changes: 1 addition & 1 deletion renameschemas
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _usage(){
exit 1
}

. "${SCRIPTDIR}/ltofunctions" || { echo "Missing '${SCRIPTDIR}/ltofunctions'. Exiting." ; exit 1 ;};
. "${SCRIPTDIR}/mmfunctions" || { echo "Missing '${SCRIPTDIR}/mmfunctions'. Exiting." ; exit 1 ;};

[ "${#}" = 0 ] && _usage
# command-line options
Expand Down
6 changes: 3 additions & 3 deletions writelto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ _usage(){
exit 1
}

. "${SCRIPTDIR}/ltofunctions" || { echo "Missing '${SCRIPTDIR}/ltofunctions'. Exiting." ; exit 1 ;};
. "${SCRIPTDIR}/mmfunctions" || { echo "Missing '${SCRIPTDIR}/mmfunctions'. Exiting." ; exit 1 ;};

# command-line options
OPTIND=1
Expand Down Expand Up @@ -43,13 +43,13 @@ find "${SOURCE_DIR}/" -name '.DS_Store' -type f -delete

_checkdir "${TAPE_PATH}"

rsync -rtvO --progress "${SOURCE_DIR}/" "${TAPE_PATH}"
"${SCRIPTDIR}/migratefiles" -o "${TAPE_PATH}" "${SOURCE_DIR}/"
RSYNC_ERR_1="$?"
HIDDEN_FILES=$(find "${TAPE_PATH}" -name ".*")
if [[ "${HIDDEN_FILES}" ]] ; then
echo "Removing hidden files from tape."
find "${TAPE_PATH}" -name ".*" -delete
rsync -rtvO --progress "${SOURCE_DIR}/" "${TAPE_PATH}"
"${SCRIPTDIR}/migratefiles" -o "${TAPE_PATH}" "${SOURCE_DIR}/"
RSYNC_ERR_2="$?"
fi
umount "${TAPE_PATH}"
Expand Down

0 comments on commit 3463786

Please sign in to comment.