aboutsummaryrefslogtreecommitdiff
path: root/share/templater/basic/setup
blob: e0a85a8f5a75b15ea48eb04a49b13ce242f1b5a6 (plain)
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
#!/bin/bash
#
# Basic files templater module.
#

# Parameters
SHARE="$1"
PROJECT="$(basename `pwd`)"

# Include basic functions
source $SHARE/templater/functions || exit 1

# Basic implementation
function templater_basic {
  if [ ! -e "README.md" ]; then
    echo "$PROJECT"                           > README.md
    basename $PROJECT | sed -e 's|.|=|g'     >> README.md
    #echo ""                                 >> README.md
    #echo "This is the $PROJECT repository." >> README.md

    echo "TODO"                > TODO.md
    echo "===="               >> TODO.md
    #echo ""                   >> TODO.md
    #echo "* Nothing here? :P" >> TODO.md

    touch ChangeLog

    if [ ! -e 'Makefile' ]; then
      cp $SHARE/basic/files/Makefile .
    fi
  else
    templater_echo "Basic files already set"
  fi
}

# Dispatch
templater_basic