From 65444d1bcc6e2cd89fde5e4916e1055a49418066 Mon Sep 17 00:00:00 2001 From: bevilj Date: Wed, 31 Oct 2018 08:39:11 +0000 Subject: [PATCH] Update scripts * Fix jekyll kill * Move back to the root directory of the project once done with serving the website * Add stop script * Build website as incremental so changes will be applied automatically git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@6 a672b425-5310-4d7a-af5c-997e18724b81 --- build.sh | 8 ++++---- site/.svnignore | 1 + stop.sh | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 stop.sh diff --git a/build.sh b/build.sh index 40d84e6..fe22eec 100755 --- a/build.sh +++ b/build.sh @@ -1,11 +1,11 @@ #!/bin/sh -if ! which jekyll 2>/dev/null 1>/dev/null; then +if ! which jekyll 2>/dev/null 1>/dev/null; then sudo gem install jekyll else - kill -9 $(ps ax | grep jekyll | grep -v grep | cut -d\ -f1) + pkill -f jekyll fi -cd site/ && jekyll serve & +cd site/ && jekyll serve --incremental & sleep 3 && open "http://localhost:4000/" - +cd .. diff --git a/site/.svnignore b/site/.svnignore index 0c3e5ab..5c91b60 100644 --- a/site/.svnignore +++ b/site/.svnignore @@ -1,2 +1,3 @@ _site/ .sass-cache/ +.jekyll-metadata diff --git a/stop.sh b/stop.sh new file mode 100755 index 0000000..4fe7d05 --- /dev/null +++ b/stop.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if which jekyll 2>/dev/null 1>/dev/null; then + pkill -f jekyll +fi