Paul Batchelorimporta901d566 years agoHistory
38 lines · 704 B · Shell
RawDownload
#!/bin/sh makefile () {    local NAME=$1    local FILEPATH=$2    local EXT=$3     local FOO="$FILEPATH"foo."$EXT"     if [ ! -f "$FILEPATH$NAME.$EXT" ]    then        echo "creating $FILEPATH$NAME.$EXT"        cp $FOO $FILEPATH$NAME.$EXT        sed -i -e s/foo/$NAME/g $FILEPATH$NAME.$EXT     else        echo "Error: file $FILEPATH$NAME.$EXT already exists."        exit 1    fi} if [ "$#" -ne 1 ]then    echo "Usage: make bootstrap MODULE_NAME=name"    exit 1fi MODNAME=$1 # Sourcemakefile $MODNAME modules/ c# Headermakefile $MODNAME h/ h# Documentationmakefile $MODNAME modules/data/ lua# Examplemakefile $MODNAME examples/ex_ c# Test filemakefile $MODNAME test/t/t_ c

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t