Commit ad38e106 authored by Vitaly Lipatov's avatar Vitaly Lipatov

remove CURDIR to EPMCURDIR and export it without override

parent 1b448880
......@@ -19,10 +19,10 @@
PROGDIR=$(dirname "$0")
PROGNAME=$(basename "$0")
CURDIR="$(pwd)"
[ -n "$EPMCURDIR" ] || export EPMCURDIR="$(pwd)"
CMDSHELL="/bin/sh"
# TODO: pwd for ./epm and which for epm
[ "$PROGDIR" = "." ] && PROGDIR="$CURDIR"
[ "$PROGDIR" = "." ] && PROGDIR="$EPMCURDIR"
if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then
PROGDIR=""
PROGNAME=""
......
......@@ -328,7 +328,7 @@ epm_install_files()
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
cp -v $files "$EPMCURDIR"
return
fi
......@@ -384,7 +384,7 @@ epm_install_files()
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
cp -v $files "$EPMCURDIR"
return
fi
......@@ -439,7 +439,7 @@ epm_install_files()
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
cp -v $files "$EPMCURDIR"
return
fi
......@@ -485,7 +485,7 @@ epm_install_files()
# check download_only before commands without repack supporting
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
cp -v $files "$EPMCURDIR"
return
fi
......@@ -735,7 +735,7 @@ epm_install()
# save files before install and repack
if [ -n "$direct" ] && [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
cp -v $files "$EPMCURDIR"
return
fi
......
......@@ -113,12 +113,12 @@ epm_pack()
return
fi
cp $packed_pkgs "$CURDIR"
cp $packed_pkgs "$EPMCURDIR"
if [ -z "$quiet" ] ; then
echo
echo "Packed packages:"
for i in $packed_pkgs ; do
echo " $CURDIR/$(basename "$i")"
echo " $EPMCURDIR/$(basename "$i")"
done
fi
fi
......
......@@ -451,12 +451,12 @@ epm_repack()
[ -z "$pkg_files" ] && info "Skip empty repack list" && return 22
if __epm_repack $pkg_files && [ -n "$repacked_pkgs" ] ; then
cp $repacked_pkgs "$CURDIR"
cp $repacked_pkgs "$EPMCURDIR"
if [ -z "$quiet" ] ; then
echo
echo "Adapted packages:"
for i in $repacked_pkgs ; do
echo " $CURDIR/$(basename "$i")"
echo " $EPMCURDIR/$(basename "$i")"
done
fi
fi
......
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