Added ticket section
This commit is contained in:
parent
29c236affa
commit
c969e00939
@ -7,7 +7,8 @@ export SCRIPT_DIR=$PROJ_DIR/scripts
|
||||
export FILES_DIR=$PROJ_DIR/files
|
||||
export SUBJECTS_DIR=$PROJ_DIR/subjects
|
||||
export UTILS_DIR=$SCRIPT_DIR/utils
|
||||
export SITE_NAV='[[/index.wiki|Index]] [[/full_index.wiki|Full Index]] [[/tasks.wiki|Tasks]] [[/how-to.wiki|How-To]] [[/subjects.wiki|Subjects]]'
|
||||
export TICKET_DIR=$PROJ_DIR/ticket
|
||||
export SITE_NAV='[[/index.wiki|Index]] [[/full_index.wiki|Full Index]] [[/tasks.wiki|Tasks]] [[/how-to.wiki|How-To]] [[/subjects.wiki|Subjects]] [[/tickets.wiki|Tickets]]'
|
||||
|
||||
function import () {
|
||||
local SCRIPT_NAME="${1:?"import : script name not provided"}"
|
||||
|
1
scripts/enabled/update_tickets.sh
Symbolic link
1
scripts/enabled/update_tickets.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../update_tickets.sh
|
@ -1,9 +1,11 @@
|
||||
#!/opt/homebrew/bin/bash
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
[[ -f config.sh ]] && [[ $CONFIG -ne 1 ]] && . config.sh
|
||||
|
||||
cd $PROJ_DIR
|
||||
|
||||
for script in $SCRIPT_DIR/enabled/**; do
|
||||
for script in $SCRIPT_DIR/enabled/*; do
|
||||
[[ -x $script ]] && $script
|
||||
done
|
||||
|
27
scripts/update_tickets.sh
Executable file
27
scripts/update_tickets.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/local/bin/bash
|
||||
|
||||
[[ $CONFIG -ne 1 ]] && {
|
||||
cd `dirname $0`
|
||||
[[ -f config.sh ]] && . config.sh
|
||||
}
|
||||
|
||||
|
||||
cat > $PROJ_DIR/tickets.wiki <<EOF
|
||||
|
||||
%title Tickets
|
||||
|
||||
----------------------
|
||||
$SITE_NAV
|
||||
----------------------
|
||||
|
||||
= Tickets =
|
||||
-----------
|
||||
`
|
||||
for file in $TICKET_DIR/*; do
|
||||
FILENAME="${file/*\/}"
|
||||
FILENAME="${FILENAME/\.*}"
|
||||
echo "- [[/ticket/$FILENAME|${FILENAME^^}]]"
|
||||
done
|
||||
`
|
||||
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user