aboutsummaryrefslogtreecommitdiffstats
path: root/bin/cp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cp')
-rwxr-xr-xbin/cp37
1 files changed, 2 insertions, 35 deletions
diff --git a/bin/cp b/bin/cp
index 81fdbe8d5c..0a523b7987 100755
--- a/bin/cp
+++ b/bin/cp
@@ -6,40 +6,8 @@
# - We allow -a as shorthand for -RpP
# - Otherwise, we stick to what SuSv3 defines
-realbin() {
- _script=`basename $0`
- found=
- for bin in `which -a $_script`; do
- if ! cmp -s $bin $0; then
- found=$bin
- break
- fi
- done
- if [ -n "$found" ]; then
- echo "$found"
- else
- return 1
- fi
-}
-quote(){
- /usr/bin/sed -e "s,','\\\\'',g; 1s,^,',; \$s,\$,',;" << EOF
-$1
-EOF
-}
-
-save () {
- case "$1" in
- # when a string contains a "'" we have to escape it
- *\'*)
- saved="$saved `quote "$1"`"
- ;;
- # otherwise just quote the variable
- *)
- saved="$saved '$1'"
- ;;
- esac
-}
+source $(dirname $0)/wrapper.sh
saved=""
while getopts fpaRHLP opt; do
@@ -58,5 +26,4 @@ for arg; do
save "$arg"
done
-eval set -- "$saved"
-exec `realbin` "$@"
+exec_real