diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/gpp.py | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -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 |