Compare commits
2 commits
bca04c8ca0
...
5a1692b8df
Author | SHA1 | Date | |
---|---|---|---|
5a1692b8df | |||
5579c0eaf3 |
1 changed files with 16 additions and 1 deletions
17
otto.sh
17
otto.sh
|
@ -9,6 +9,15 @@ CROSS_COMPILE=1
|
|||
TEMPLATE_FILES=".template_files"
|
||||
MODULE_DIR="${TEMPLATE_FILES}/modules"
|
||||
|
||||
IS_FREEBSD=0
|
||||
is_freebsd () {
|
||||
UNAME="$(uname)"
|
||||
if [ $UNAME == "FreeBSD" ]; then
|
||||
IS_FREEBSD=1
|
||||
else
|
||||
IS_FREEBSD=0
|
||||
fi
|
||||
}
|
||||
|
||||
format_source_code () {
|
||||
#Get a list of all C files
|
||||
|
@ -127,8 +136,14 @@ add_new_module () {
|
|||
echo "Exiting without changing anything"
|
||||
exit
|
||||
fi
|
||||
|
||||
is_freebsd
|
||||
if [ IS_FREEBSD -eq 0]; then
|
||||
modname_cap=$(echo $modname | sed 's/[a-z]/\U&/g')
|
||||
else
|
||||
modname_cap=$( echo $modname | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/')
|
||||
fi
|
||||
|
||||
modname_cap=$(echo $modname | sed 's/[a-z]/\U&/g')
|
||||
modsrc_dir="./src/${modname}"
|
||||
modtest_dir="./tests/${modname}"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue