Code cleanup
This commit is contained in:
parent
91d6fb0e34
commit
c2bec239b3
9
tools/utils.sh
Normal file → Executable file
9
tools/utils.sh
Normal file → Executable file
|
@ -17,7 +17,10 @@
|
||||||
|
|
||||||
|
|
||||||
#variables
|
#variables
|
||||||
|
#XXX make it reproducible
|
||||||
YEAR=`date '+%Y'`
|
YEAR=`date '+%Y'`
|
||||||
|
#executables
|
||||||
|
CAT="cat"
|
||||||
|
|
||||||
|
|
||||||
#functions
|
#functions
|
||||||
|
@ -26,7 +29,7 @@ includes() {
|
||||||
BASENAME="$1"
|
BASENAME="$1"
|
||||||
PROGRAM="$2"
|
PROGRAM="$2"
|
||||||
|
|
||||||
cat << EOF
|
$CAT << EOF
|
||||||
|
|
||||||
/* $BASENAME */
|
/* $BASENAME */
|
||||||
#define main _${PROGRAM}_main
|
#define main _${PROGRAM}_main
|
||||||
|
@ -47,9 +50,9 @@ EOF
|
||||||
|
|
||||||
|
|
||||||
#main
|
#main
|
||||||
cat > "utils.c" << EOF
|
$CAT > "utils.c" << EOF
|
||||||
/* \$Id\$ */
|
/* \$Id\$ */
|
||||||
/* Copyright (c) 2011 Pierre Pronchery <khorben@defora.org> */
|
/* Copyright (c) $YEAR Pierre Pronchery <khorben@defora.org> */
|
||||||
/* This file is part of DeforaOS Unix utils */
|
/* This file is part of DeforaOS Unix utils */
|
||||||
/* This program is free software: you can redistribute it and/or modify
|
/* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
Loading…
Reference in New Issue
Block a user