Skip to content

Commit

Permalink
add bugtracker manglers
Browse files Browse the repository at this point in the history
  • Loading branch information
nazunalika committed Feb 13, 2024
1 parent 5eee8d4 commit 2d6eeed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mangle/bugs/generate_category_sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
NAME="${1}"
PROJECT_ID="${2}"

printf "INSERT INTO mantis_category_table (project_id, user_id, name, status) VALUES('%s', '0', '%s', '0');\n" "${PROJECT_ID}" "${NAME}"
12 changes: 12 additions & 0 deletions mangle/bugs/generate_category_sql_list
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
LIST="${1}"
PROJECT_ID="${2}"

if [ ! -f "${LIST}" ]; then
echo "Not a file list"
exit 2
fi

while IFS= read -r line; do
printf "INSERT INTO mantis_category_table (project_id, user_id, name, status) VALUES('%s', '0', '%s', '0');\n" "${PROJECT_ID}" "${line}"
done < "${LIST}"

0 comments on commit 2d6eeed

Please sign in to comment.