Mercurial > hg > Members > atton > seminar_slides
changeset 13:62d6bd64af0a
Mini refactor new_slide.sh
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 01 Feb 2014 00:10:16 +0900 |
parents | daf59131cdb8 |
children | 54fed5d73027 |
files | new_slide.sh |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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}