Mercurial > hg > Members > atton > seminar_slides
comparison new_slide.sh @ 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 | 213c5de5d47d |
children |
comparison
equal
deleted
inserted
replaced
12:daf59131cdb8 | 13:62d6bd64af0a |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 cd $(dirname $0) | |
4 | |
3 # import definitions | 5 # import definitions |
4 . `dirname $0`/config/definition.sh | 6 . config/definition.sh |
5 | 7 |
6 # function | 8 # function |
7 | 9 |
8 dirname_from_day_of_the_week() { | 10 dirname_from_day_of_the_week() { |
9 | 11 |
29 } | 31 } |
30 | 32 |
31 # main | 33 # main |
32 | 34 |
33 slide_dirname=`dirname_from_day_of_the_week ${1}` | 35 slide_dirname=`dirname_from_day_of_the_week ${1}` |
34 dir_full_path="`dirname $0`/${slide_root_dirname}/${slide_dirname}" | 36 dir_full_path="${slide_root_dirname}/${slide_dirname}" |
35 slide_full_path="${dir_full_path}/${slide_name}" | 37 slide_full_path="${dir_full_path}/${slide_name}" |
36 template_full_path="`dirname $0`/${slide_template_file}" | |
37 | 38 |
38 mkdir -p ${dir_full_path} | 39 mkdir -p ${dir_full_path} |
39 if !([ -f ${slide_full_path} ];) then | 40 if !([ -f ${slide_full_path} ];) then |
40 cp ${template_full_path} ${slide_full_path} | 41 cp ${slide_template_file} ${slide_full_path} |
41 fi | 42 fi |
42 echo ${slide_full_path} | 43 echo ${slide_full_path} |