From b0787a1224685cbf1104006ab48300e04579e8bb Mon Sep 17 00:00:00 2001 From: shockrah Date: Thu, 23 Apr 2020 13:58:08 -0700 Subject: [PATCH] no longer using these scripts as gensite takes care of things now --- deploy.sh | 22 -------------- make | 90 ------------------------------------------------------- 2 files changed, 112 deletions(-) delete mode 100644 deploy.sh delete mode 100755 make diff --git a/deploy.sh b/deploy.sh deleted file mode 100644 index e7f44fc..0000000 --- a/deploy.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Build it all -#./make -a - -if [ -f .env ];then - . ./.env -fi - -rootDir='./site/' -url="https://$USER:$PASS@neocities.org/api" - -cd $rootDir -# First the root pages -for lpage in `find . -type f`;do - remote=`echo $lpage | cut -c2-64` - echo curl -F $remote'=@'$lpage $url/upload - curl -F "$remote"'=@'"$lpage" "$url"/upload -done - -#curl -F "/yes/test.html=@e.html" "$url/upload" - diff --git a/make b/make deleted file mode 100755 index 1ab3fd2..0000000 --- a/make +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash -rootDir='./site/' -targetDir='post/' - -post() { - echo Building: $1 - tmp=".swap" - full=".fullswap" - base=`basename $1` - # First build the content of the site - pandoc $1 > $tmp - # Title, images and tables get added/fixed here - sed "s/{TITLE}/${base%.*}<\/title>/g" ./templates/post-header.html > $full - cat $tmp ./templates/post-footer.html >> $full - sed -i 's/<img/<img class="pure-img"/g;s/<table>/<table class="pure-table">/g' $full - - # Move things to proper directory and cleanup - mv $full "$rootDir/$targetDir/${base%.*}.html" - rm -f $tmp -} - -build_all() { - mkdir -p $rootDir/post/ $rootDir/fonts/ $rootDir/img/ - - cp style.css "$rootDir" - cp prebuild/post/style.css "$rootDir/post/" - - cp fonts/* $rootDir/fonts/ - - cp img/ $rootDir/img/ -r - mv $rootDir/img/favicon.png $rootDir/ - - # Try to get xargs to deal with this ugliness - for r in prebuild/*md;do - post $r - done - for p in prebuild/post/*md;do - post $p - done -} - -_help() { - echo 'Options: - -h show this prompt - -p [postDirectory/*] (takes a list of paths to build from) - -r build root pages - -s copy stylesheets - -l run live server' -} -server() { - cd $rootDir - echo 'Address: 0.0.0.0:8080' - python -m SimpleHTTPServer 8080 -} - -if [ -z $1 ] -then - _help - exit 0 -fi - -while getopts ":aslrhp:" opt;do - case "$opt" in - a) - build_all;; - s) - cp style.css "$rootDir" - cp prebuild/post/style.css "$rootDir/$targetDir" - exit 0 - ;; - r) - # Fix targetDir so that it points to the root of the site output - targetDir='' - post './prebuild/about.md' - post './prebuild/links.md' - post './prebuild/index.md' - post './prebuild/stream.md' - exit 0 - ;; - p) - for file in ${@:2};do - post $file - done - ;; - h) - _help;; - l) - server;; - esac -done