aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gpp.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/gpp.py b/src/gpp.py
index f5be2df..d6fdf5e 100755
--- a/src/gpp.py
+++ b/src/gpp.py
@@ -1,4 +1,23 @@
#!/usr/bin/env python3
+'''
+gpp – Bash based general purpose preprocessor
+
+Copyright © 2013 Mattias Andrée (maandree@member.fsf.org)
+
+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
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+'''
+VERSION="@{VERSION}"
import os
import sys
@@ -33,6 +52,27 @@ for i in range(1, len(args)):
elif arg in ('-f', '--file'):
input_file = sys.argv[i]
output_file = sys.argv[i]
+ elif arg in ('-v', '--version'):
+ print('gpp ' + VERSION)
+ sys.exit(0)
+ elif arg in ('-c', '--copying'):
+ print('gpp – Bash based general purpose preprocessor')
+ print('')
+ print('Copyright © 2013 Mattias Andrée (maandree@member.fsf.org)')
+ print('')
+ print('This program is free software: you can redistribute it and/or modify')
+ print('it under the terms of the GNU General Public License as published by')
+ print('the Free Software Foundation, either version 3 of the License, or')
+ print('(at your option) any later version.')
+ print('')
+ print('This program is distributed in the hope that it will be useful,')
+ print('but WITHOUT ANY WARRANTY; without even the implied warranty of')
+ print('MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the')
+ print('GNU General Public License for more details.')
+ print('')
+ print('You should have received a copy of the GNU General Public License')
+ print('along with this program. If not, see <http://www.gnu.org/licenses/>.')
+ sys.exit(0)
else:
continue
i += 1