Commit 71e0fd7e authored by Vitaly Lipatov's avatar Vitaly Lipatov

add print version

parent 5bc3c416
......@@ -62,6 +62,13 @@ $Usage
"
}
print_version()
{
echo "EPM package manager version @VERSION@"
echo "Copyright (c) Etersoft 2012"
echo "This program may be freely redistributed under the terms of the GNU GPL"
}
Usage="Usage: epm [options] <command> [package name(s), package files]..."
Descr="epm - EPM package manager"
......@@ -97,7 +104,11 @@ for opt in "$@" ; do
-h|--help|help)
phelp; exit 0
;;
-v|--verbose)
-v|--version)
print_version
exit
;;
--verbose)
verbose=1
;;
--auto)
......@@ -162,6 +173,11 @@ set_target_pkg_env
set_pm_type
# Run helper for command
[ -n "$epm_cmd" ] || fatal "Run without any command"
if [ -z "$epm_cmd" ] ; then
print_version
echo
fatal "Run $ epm --help for get help"
fi
load_helper epm-$epm_cmd
epm_$epm_cmd || fatal ""
......@@ -23,6 +23,9 @@ universal interface to any package manager.
%prep
%setup
%build
%__subst "s|@VERSION@|%version-%release|g" bin/epm
%install
# install to datadir and so on
%makeinstall
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment