| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function git_deleteRepoFile { |
| |
| local TARGET=$(cli_checkRepoDirSource ${1}) |
| |
| |
| cli_printMessage "${TARGET}" --as-deleting-line |
| |
| |
| |
| if [[ $(cli_runFnEnvironment vcs --status ${TARGET}) =~ '^(A|M|R)$' ]];then |
| ${COMMAND} reset HEAD ${TARGET} --quiet |
| fi |
| |
| |
| |
| if [[ $(cli_runFnEnvironment vcs --status ${TARGET}) =~ '^\?\?$' ]];then |
| |
| if [[ -d ${TARGET} ]];then |
| rm -r ${TARGET} |
| else |
| rm ${TARGET} |
| fi |
| else |
| |
| if [[ -d ${TARGET} ]];then |
| ${COMMAND} rm ${TARGET} -r --force --quiet |
| else |
| ${COMMAND} rm ${TARGET} --force --quiet |
| fi |
| fi |
| |
| } |