# HG changeset patch # User Yasutaka Higa # Date 1391181016 -32400 # Node ID 62d6bd64af0a4edd3dd32c113c930c34fb9ca8d0 # Parent daf59131cdb8284fe3c57916f1aface99d6ff94a Mini refactor new_slide.sh diff -r daf59131cdb8 -r 62d6bd64af0a new_slide.sh --- a/new_slide.sh Sat Feb 01 00:08:07 2014 +0900 +++ b/new_slide.sh Sat Feb 01 00:10:16 2014 +0900 @@ -1,7 +1,9 @@ #!/bin/sh +cd $(dirname $0) + # import definitions -. `dirname $0`/config/definition.sh +. config/definition.sh # function @@ -31,12 +33,11 @@ # main slide_dirname=`dirname_from_day_of_the_week ${1}` -dir_full_path="`dirname $0`/${slide_root_dirname}/${slide_dirname}" +dir_full_path="${slide_root_dirname}/${slide_dirname}" slide_full_path="${dir_full_path}/${slide_name}" -template_full_path="`dirname $0`/${slide_template_file}" mkdir -p ${dir_full_path} if !([ -f ${slide_full_path} ];) then - cp ${template_full_path} ${slide_full_path} + cp ${slide_template_file} ${slide_full_path} fi echo ${slide_full_path}