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