| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli_getRepoName { |
| |
| local NAME="$1" |
| local TYPE="$2" |
| |
| case $TYPE in |
| |
| f | regular-file ) |
| NAME=$(echo $NAME \ |
| | tr -s ' ' '_' \ |
| | tr '[:upper:]' '[:lower:]') |
| ;; |
| |
| d | directory ) |
| NAME=$(echo $NAME \ |
| | tr -s ' ' '_' \ |
| | tr '[:upper:]' '[:lower:]' \ |
| | sed -r 's/^([[:alpha:]])/\u\1/') |
| ;; |
| |
| esac |
| |
| echo $NAME |
| |
| } |