Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bin/casher
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ function add {
return
fi

paths=$(expand_path "$@")
# paths=$(expand_path "$@")
paths="$@"
Comment on lines +144 to +145

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On closer inspection:

travis_build stock logic that uses ~ for cache paths will become broken since Bash won't expand it in $(checksum_checker) invocation:

$ paths="~ C:\\"
$ md5deep64 ${paths}
C:\Users\Sasha\~: No such file or directory
C:\: Is a directory

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes also need to be duplicated into Ruby version since it's used in preference to Bash version if RVM is available.


for path in ${paths}; do
if [[ -L ${path} ]]; then
Expand Down Expand Up @@ -170,7 +171,7 @@ function add {
unset IFS
fi

$(checksum_checker) -o f -r ${paths} | sort >> ${CHECKSUM_FILE_BEFORE}
$(checksum_checker) -l -o f -r ${paths} | sort >> ${CHECKSUM_FILE_BEFORE}
}

function push {
Expand Down Expand Up @@ -227,7 +228,7 @@ function changed_p {
fi

sort ${CHECKSUM_FILE_BEFORE} | uniq > ${CHECKSUM_FILE_BEFORE}.sorted
$(checksum_checker) -o f -r $(<${PATHS_FILE}) | sort | uniq > ${CHECKSUM_FILE_AFTER}
$(checksum_checker) -l -o f -r $(<${PATHS_FILE}) | sort | uniq > ${CHECKSUM_FILE_AFTER}
diff -B ${CHECKSUM_FILE_BEFORE}.sorted ${CHECKSUM_FILE_AFTER} | \
awk '/^[<>]/ {for (i=3; i<=NF; i++) printf("%s%s", $(i), i<NF? OFS : "\n")};' | sort | uniq > ${DIFF_FILE}

Expand Down