-
Notifications
You must be signed in to change notification settings - Fork 4
/
ceur-make-init
executable file
·43 lines (37 loc) · 1.15 KB
/
ceur-make-init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#
# Script to set up ceur-make in a given directory
#
# Part of ceur-make (https://github.com/ceurws/ceur-make/)
#
# © Christoph Lange and contributors 2013–2015
#
# Licensed under GPLv3 or any later version
INIT_FILE=".ceur-make-initrc"
[[ -r "$INIT_FILE" ]] && . "$INIT_FILE"
CEUR_MAKE_FILES_ALWAYS_COPY="toc.xml \
workshop.xml"
CEUR_MAKE_FILES_MAY_LINK="Makefile \
easychair2xml.pl \
copyright-form.xsl \
id.xsl \
toc2bibtex.xsl \
toc2ceurindex.xsl \
toc2latex.xsl"
CEUR_MAKE_FILES_TEMPLATES="Makefile.vars.template"
TARGET_DIRECTORY="${1?please specify the directory in which ceur-make should be initialized}"
[[ -d "${TARGET_DIRECTORY}" ]] || mkdir --parents "${TARGET_DIRECTORY}"
if [[ -z "$CEUR_MAKE_DEVEL_MODE" ]]
then
cp -v $CEUR_MAKE_FILES_ALWAYS_COPY $CEUR_MAKE_FILES_MAY_LINK $CEUR_MAKE_FILES_TEMPLATES "${TARGET_DIRECTORY}"
else
cp -v $CEUR_MAKE_FILES_ALWAYS_COPY "${TARGET_DIRECTORY}"
for link in $CEUR_MAKE_FILES_MAY_LINK
do
ln -sv "$PWD/$link" "${TARGET_DIRECTORY}"
done
for template in $CEUR_MAKE_FILES_TEMPLATES
do
cp -v $template "${TARGET_DIRECTORY}/${template%.template}"
done
fi