get rid of dirname
This commit is contained in:
parent
3c204119fb
commit
bd19e31c6e
3 changed files with 6 additions and 8 deletions
|
@ -17,8 +17,8 @@
|
|||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
YADM_DIRECTORY=$(dirname "$YADM_HOOK_REPO")
|
||||
YADM_CHECKSUMS=$YADM_DIRECTORY/files.checksums
|
||||
YADM_CHECKSUMS="$YADM_HOOK_DIR/files.checksums"
|
||||
WARNING_MESSAGE="No checksums were created"
|
||||
|
||||
# unpack exported array; filenames including a newline character (\n)
|
||||
# are NOT supported
|
||||
|
@ -27,8 +27,6 @@ IFS=$'\n'
|
|||
YADM_ENCRYPT_INCLUDE_FILES=( $YADM_ENCRYPT_INCLUDE_FILES )
|
||||
IFS="$OLD_IFS"
|
||||
|
||||
WARNING_MESSAGE="No checksums were created"
|
||||
|
||||
|
||||
function get_checksum_command {
|
||||
# check if "shasum" exists and supports the algorithm (which is
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
YADM_DIRECTORY=$(dirname "$YADM_HOOK_REPO")
|
||||
YADM_CHECKSUMS=$YADM_DIRECTORY/files.checksums
|
||||
YADM_CHECKSUMS="$YADM_HOOK_DIR/files.checksums"
|
||||
WARNING_MESSAGE="Checksums were not verified"
|
||||
|
||||
# unpack exported array; filenames including a newline character (\n)
|
||||
# are NOT supported
|
||||
|
@ -27,8 +27,6 @@ IFS=$'\n'
|
|||
YADM_ENCRYPT_INCLUDE_FILES=( $YADM_ENCRYPT_INCLUDE_FILES )
|
||||
IFS="$OLD_IFS"
|
||||
|
||||
WARNING_MESSAGE="Checksums were not verified"
|
||||
|
||||
|
||||
function get_checksum_command {
|
||||
# check if "shasum" exists and supports the algorithm (which is
|
||||
|
|
2
yadm
2
yadm
|
@ -1573,6 +1573,7 @@ function invoke_hook() {
|
|||
|
||||
# expose some internal data to all hooks
|
||||
YADM_HOOK_COMMAND=$HOOK_COMMAND
|
||||
YADM_HOOK_DIR=$YADM_DIR
|
||||
YADM_HOOK_EXIT=$exit_status
|
||||
YADM_HOOK_FULL_COMMAND=$FULL_COMMAND
|
||||
YADM_HOOK_REPO=$YADM_REPO
|
||||
|
@ -1583,6 +1584,7 @@ function invoke_hook() {
|
|||
YADM_ENCRYPT_INCLUDE_FILES=$(join_string $'\n' "${ENCRYPT_INCLUDE_FILES[@]}")
|
||||
|
||||
export YADM_HOOK_COMMAND
|
||||
export YADM_HOOK_DIR
|
||||
export YADM_HOOK_EXIT
|
||||
export YADM_HOOK_FULL_COMMAND
|
||||
export YADM_HOOK_REPO
|
||||
|
|
Loading…
Reference in a new issue