Commit cfa06320 authored by Vitaly Lipatov's avatar Vitaly Lipatov

yum: sync code

parent ad595c36
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2012-2021 Etersoft # Copyright (C) 2012-2023 Etersoft
# Copyright (C) 2012-2021 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2012-2023 Vitaly Lipatov <lav@etersoft.ru>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
...@@ -19,18 +19,31 @@ ...@@ -19,18 +19,31 @@
PROGDIR=$(dirname "$0") PROGDIR=$(dirname "$0")
PROGNAME=$(basename "$0") PROGNAME=$(basename "$0")
[ "$PROGDIR" = "." ] && PROGDIR=$(pwd) [ -n "$EPMCURDIR" ] || export EPMCURDIR="$(pwd)"
CMDSHELL="/bin/sh"
[ "$PROGDIR" = "." ] && PROGDIR="$EPMCURDIR"
if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then
PROGDIR="" PROGDIR=""
PROGNAME="" PROGNAME=""
fi fi
# will replaced with /usr/share/eepm during install # will replaced with /usr/share/eepm during install
SHAREDIR=$PROGDIR SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install # will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc CONFIGDIR=$PROGDIR/../etc
EPMVERSION="@VERSION@"
# package, single (file), pipe, git
EPMMODE="package"
[ "$SHAREDIR" = "$PROGDIR" ] && EPMMODE="single"
[ "$EPMVERSION" = "@""VERSION""@" ] && EPMMODE="git"
[ "$PROGNAME" = "" ] && EPMMODE="pipe"
if [ "$EPMMODE" = "git" ] ; then
EPMVERSION=$(head $PROGDIR/../eepm.spec | grep "^Version: " | sed -e 's|Version: ||' )
fi
load_helper() load_helper()
{ {
local CMD="$SHAREDIR/$1" local CMD="$SHAREDIR/$1"
...@@ -47,8 +60,6 @@ load_helper epm-sh-functions ...@@ -47,8 +60,6 @@ load_helper epm-sh-functions
set_pm_type set_pm_type
#set_sudo
check_tty check_tty
############################# #############################
...@@ -70,14 +81,13 @@ $(get_help HELPOPT | sed -e 's@|@,@g') ...@@ -70,14 +81,13 @@ $(get_help HELPOPT | sed -e 's@|@,@g')
print_version() print_version()
{ {
echo "EPM package manager version @VERSION@ https://wiki.etersoft.ru/Epm" echo "EPM package manager version $EPMVERSION https://wiki.etersoft.ru/Epm"
echo "Running on $($DISTRVENDOR -e) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)" echo "Running on $($DISTRVENDOR -e) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)"
echo "Copyright (c) Etersoft 2012-2021" echo "Copyright (c) Etersoft 2012-2023"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
} }
EPMVERSION=@VERSION@
verbose= verbose=
quiet= quiet=
nodeps= nodeps=
...@@ -285,7 +295,7 @@ check_filenames() ...@@ -285,7 +295,7 @@ check_filenames()
elif [ -d "$opt" ] ; then elif [ -d "$opt" ] ; then
has_space "$opt" && warning "There are space(s) in directory path '$opt', it is not supported. Skipped" && continue has_space "$opt" && warning "There are space(s) in directory path '$opt', it is not supported. Skipped" && continue
pkg_dirs="$pkg_dirs $opt" pkg_dirs="$pkg_dirs $opt"
elif echo "$opt" | grep -q "^[fhtps]*://" ; then elif is_url "$opt" ; then
has_space "$opt" && warning "There are space(s) in URL '$opt', it is not supported. Skipped" && continue has_space "$opt" && warning "There are space(s) in URL '$opt', it is not supported. Skipped" && continue
pkg_urls="$pkg_urls $opt" pkg_urls="$pkg_urls $opt"
else else
......
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