Add a --version command line option
https://bugzilla.gnome.org/show_bug.cgi?id=613164
This commit is contained in:
parent
22bf4c8a93
commit
744bc996db
@ -18,6 +18,7 @@ gnome-shell: gnome-shell.in
|
|||||||
-e "s|@libdir[@]|$(libdir)|" \
|
-e "s|@libdir[@]|$(libdir)|" \
|
||||||
-e "s|@pkgdatadir[@]|$(pkgdatadir)|" \
|
-e "s|@pkgdatadir[@]|$(pkgdatadir)|" \
|
||||||
-e "s|@PYTHON[@]|$(PYTHON)|" \
|
-e "s|@PYTHON[@]|$(PYTHON)|" \
|
||||||
|
-e "s|@VERSION[@]|$(VERSION)|" \
|
||||||
-e "s|@sysconfdir[@]|$(sysconfdir)|" \
|
-e "s|@sysconfdir[@]|$(sysconfdir)|" \
|
||||||
$< > $@ && chmod a+x $@
|
$< > $@ && chmod a+x $@
|
||||||
CLEANFILES += gnome-shell
|
CLEANFILES += gnome-shell
|
||||||
|
@ -14,6 +14,10 @@ import termios
|
|||||||
import time
|
import time
|
||||||
import errno
|
import errno
|
||||||
|
|
||||||
|
def show_version(option, opt_str, value, parser):
|
||||||
|
print "GNOME Shell @VERSION@"
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
def get_running_session_environs():
|
def get_running_session_environs():
|
||||||
wanted_environment = ['DBUS_SESSION_BUS_ADDRESS', 'DISPLAY', 'XDG_DATA_DIRS',
|
wanted_environment = ['DBUS_SESSION_BUS_ADDRESS', 'DISPLAY', 'XDG_DATA_DIRS',
|
||||||
'XAUTHORITY', 'XDG_SESSION_COOKIE', 'ORBIT_SOCKETDIR',
|
'XAUTHORITY', 'XDG_SESSION_COOKIE', 'ORBIT_SOCKETDIR',
|
||||||
@ -258,6 +262,8 @@ parser.add_option("", "--eval-file", metavar="EVAL_FILE",
|
|||||||
help="Evaluate the contents of the given JavaScript file")
|
help="Evaluate the contents of the given JavaScript file")
|
||||||
parser.add_option("", "--create-extension", action="store_true",
|
parser.add_option("", "--create-extension", action="store_true",
|
||||||
help="Create a new GNOME Shell extension")
|
help="Create a new GNOME Shell extension")
|
||||||
|
parser.add_option("", "--version", action="callback", callback=show_version,
|
||||||
|
help="Display version and exit")
|
||||||
|
|
||||||
options, args = parser.parse_args()
|
options, args = parser.parse_args()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user