diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-10-12 11:56:22 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-10-12 11:56:22 +0200 |
commit | c4159cba5836083dc2be2b5396cbf85319d31768 (patch) | |
tree | 48918cce2cfb22f0baaf1a414e893e4117a8f048 /src/gpp.py | |
parent | do not obmit, white out the shebang line (diff) | |
download | gpp-c4159cba5836083dc2be2b5396cbf85319d31768.tar.gz gpp-c4159cba5836083dc2be2b5396cbf85319d31768.tar.bz2 gpp-c4159cba5836083dc2be2b5396cbf85319d31768.tar.xz |
add --copying and --version
Diffstat (limited to '')
-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 |