update-tags-encoding: escape '/' and ',' in tags

This commit is contained in:
Sebastian Kuzminsky 2025-07-24 12:09:22 -06:00
parent 01ef8679b4
commit 3d008bd390

View file

@ -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