update a few more things

This commit is contained in:
speedie 2022-11-25 20:51:44 +01:00
parent 4bef4bf538
commit 864e154084
3 changed files with 70 additions and 64 deletions

View file

@ -181,7 +181,7 @@ page_release:
upload: upload:
chmod +x scripts/speedwm-mkpage chmod +x scripts/speedwm-mkpage
./scripts/speedwm-mkpage -ulspeedwm ./scripts/speedwm-mkpage --release
@echo "Uploaded everything." @echo "Uploaded everything."
page: page:
@ -190,12 +190,12 @@ page:
page_html: page_html:
chmod +x scripts/speedwm-mkpage chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mkpage ./scripts/speedwm-mkpage --make-page
page_php: page_php:
chmod +x scripts/speedwm-mkpage chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mkpage ./scripts/speedwm-mkpage --make-page
mv readme.html readme.php mv readme.html readme.php
page_install: page_install:
@ -217,27 +217,32 @@ page_push:
echo ${PAGEDIR} > /tmp/speedwm-htmldir echo ${PAGEDIR} > /tmp/speedwm-htmldir
chmod +x scripts/speedwm-mkpage chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -page-push ./scripts/speedwm-mkpage --release-page
html: html:
chmod +x scripts/speedwm-mkpage chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mkhtml ./scripts/speedwm-mkpage --make-html
php: php:
chmod +x scripts/speedwm-mkpage chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mkpage ./scripts/speedwm-mkpage --make-page
mv readme.html readme.php mv readme.html readme.php
markdown: markdown:
chmod +x scripts/speedwm-mkpage chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mkmd ./scripts/speedwm-mkpage --make-markdown
man:
chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage --make-man
readme: readme:
chmod +x scripts/speedwm-mkpage chmod +x scripts/speedwm-mkpage
chmod +x scripts/speedwm-help chmod +x scripts/speedwm-help
./scripts/speedwm-mkpage -mk ./scripts/speedwm-mkpage -mk
.PHONY: all options clean dist install install_only_bin install_only_misc modules_install uninstall help docs page page_html page_php page_install page_release html php markdown readme page_push upload release previmg_install css_install .PHONY: all options clean dist install install_only_bin install_only_misc modules_install uninstall help docs page page_html page_php page_install page_release html php markdown man readme page_push upload release previmg_install css_install

View file

@ -6,6 +6,7 @@ cd scripts
export DOCDIR="../docs" # Set documentation directory so that it will ALWAYS use the latest documentation export DOCDIR="../docs" # Set documentation directory so that it will ALWAYS use the latest documentation
export USEPREFIX="false" # Set empty prefix export USEPREFIX="false" # Set empty prefix
# make page
MKPAGE() { MKPAGE() {
./speedwm-help --generate-html ./speedwm-help --generate-html
./speedwm-help --generate-page ./speedwm-help --generate-page
@ -15,6 +16,7 @@ MKPAGE() {
echo "Created readme.html" echo "Created readme.html"
} }
# push page only
PUSHPAGE() { PUSHPAGE() {
HTMLDIR=$(cat /tmp/speedwm-htmldir) HTMLDIR=$(cat /tmp/speedwm-htmldir)
cd $HTMLDIR || exit 1 cd $HTMLDIR || exit 1
@ -24,34 +26,33 @@ PUSHPAGE() {
exit 1 exit 1
} }
# make html
MKHTML() { MKHTML() {
MKMD
./speedwm-help --generate-html ./speedwm-help --generate-html
cd .. cd ..
echo "Created readme.html" echo "Created readme.html"
} }
# make markdown
MKMD() { MKMD() {
./speedwm-help --generate-markdown ./speedwm-help --generate-markdown
cd ..
echo "Created README.md" echo "Created README.md"
} }
MK() { # make man page
./speedwm-help -w MK1() {
MKMD
./speedwm-help --generate-man
cd .. cd ..
echo "Created readme"
} }
# Perform actions based on user input # Perform actions based on user input
case "$1" in case "$1" in
"") echo "speedwm-mkpage\nNo arguments | Show the help screen\n-h | Show the help screen\n-mkpage | Create full page with templates from docs/\n-mkhtml | Create HTML document based on speedwm documentation\n-mkmd | Create markdown file (usually for use with GitHub repositories)\n-mk | Copy the output of speedwm-help -a to 'readme'.\n-ulspeedwm | Auto-push speedwm changes\n" ; exit 0 ;; "--make-man") MK1 && exit 0 ;;
"-help") $0 && exit 0 ;; "--make-page") MKPAGE && exit 0 ;;
"-h") $0 && exit 0 ;; "--make-html") MKHTML && exit 0 ;;
"-mkpage") MKPAGE && exit 0 ;; "--make-markdown") MKMD && cd .. ; exit 0 ;;
"-mkhtml") MKHTML && exit 0 ;; "--release-page") PUSHPAGE && exit 0 ;;
"-mkmd") MKMD && exit 0 ;; "--release") cd .. && git add * && git commit -a -m "speedwm-mkpage: Auto-pushed speedwm changes!" && git push && exit 0 ;;
"-mk") MK && exit 0 ;;
"-page-push") PUSHPAGE && exit 0 ;;
"-ulspeedwm") cd .. && git add * && git commit -a -m "speedwm-mkpage: Auto-pushed speedwm changes!" && git push && exit 0 ;;
esac esac