update-tags-encoding: escape '/' and ',' in tags
This commit is contained in:
parent
01ef8679b4
commit
3d008bd390
1 changed files with 8 additions and 0 deletions
|
|
@ -12,6 +12,13 @@
|
||||||
set -e
|
set -e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
|
function escape_tag() {
|
||||||
|
TAG="$1"
|
||||||
|
TAG=$(echo "${TAG}" | sed -re 's/,/,0/g')
|
||||||
|
TAG=$(echo "${TAG}" | sed -re 's/\//,1/g')
|
||||||
|
echo "${TAG}"
|
||||||
|
}
|
||||||
|
|
||||||
BRANCH=""
|
BRANCH=""
|
||||||
|
|
||||||
if [[ -n "$1" ]] && [[ -d "$1" ]]; then
|
if [[ -n "$1" ]] && [[ -d "$1" ]]; then
|
||||||
|
|
@ -58,6 +65,7 @@ for ISSUE_ID in $(find . -maxdepth 1 -type d -regextype posix-extended -regex '\
|
||||||
|
|
||||||
mkdir tags
|
mkdir tags
|
||||||
for TAG in ${TAGS}; do
|
for TAG in ${TAGS}; do
|
||||||
|
TAG=$(escape_tag "${TAG}")
|
||||||
touch "tags/${TAG}"
|
touch "tags/${TAG}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue