fix(funtrack): shellcheck

pull/13/head
kevin zhuang 4 years ago
parent 2d0db18d82
commit 0690d5dc83

@ -75,7 +75,7 @@ done < <(get_git_file "select files to untrack")
[[ "${#selected_files[@]}" -eq 0 ]] && exit 1
if [[ "${track_type}" == "temp" ]]; then
[[ -z "${confirm}" ]] && echo "(dryrun) dotbare update-index --assume-unchanged ${selected_files[@]}"
[[ -z "${confirm}" ]] && echo "(dryrun) dotbare update-index --assume-unchanged" "${selected_files[@]}"
[[ -z "${confirm}" ]] && confirm=$(get_confirmation "Files will be temporarily stop being tracked for changes, continue?")
[[ "${confirm}" != 'y' ]] && exit 1
/usr/bin/git --git-dir="${DOTBARE_DIR}" --work-tree="${DOTBARE_TREE}" update-index --assume-unchanged "${selected_files[@]}"
@ -85,7 +85,7 @@ if [[ "${track_type}" == "temp" ]]; then
echo "dotbare funtrack -t is using git update-index --assume-unchanged under the hood"
echo "Please refer to git update-index official documentation for more details or visit dotbare's github page"
elif [[ "${track_type}" == "retrack" ]]; then
[[ -z "${confirm}" ]] && echo "(dryrun) dotbare update-index --no-assume-unchanged ${selected_files[@]}"
[[ -z "${confirm}" ]] && echo "(dryrun) dotbare update-index --no-assume-unchanged" "${selected_files[@]}"
[[ -z "${confirm}" ]] && confirm=$(get_confirmation "Files will resume being tracked by git, continue?")
[[ "${confirm}" != 'y' ]] && exit 1
/usr/bin/git --git-dir="${DOTBARE_DIR}" --work-tree="${DOTBARE_TREE}" update-index --no-assume-unchanged "${selected_files[@]}"
@ -95,7 +95,7 @@ elif [[ "${track_type}" == "retrack" ]]; then
echo "dotbare funtrack -t is using git update-index --assume-unchanged under the hood"
echo "Please refer to git update-index official documentation for more details or visit dotbare's github page"
else
[[ -z "${confirm}" ]] && echo "(dryrun) dotbare rm --cached ${selected_files[@]}"
[[ -z "${confirm}" ]] && echo "(dryrun) dotbare rm --cached" "${selected_files[@]}"
[[ -z "${confirm}" ]] && confirm=$(get_confirmation "Untrack the selected files?")
[[ "${confirm}" != 'y' ]] && exit 1
/usr/bin/git --git-dir="${DOTBARE_DIR}" --work-tree="${DOTBARE_TREE}" rm --cached "${selected_files[@]}"

Loading…
Cancel
Save