Permalink
Browse files

Fixes #7275. Update the other 3 copies of cpsimple as [21657] did for…

… the one in mythtv/themes.

git-svn-id: http://svn.mythtv.org/svn/trunk@22335 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information...
sphery committed Oct 9, 2009
1 parent dd09a4e commit c910264640c2bc5aa8683726fd681c0aa483e428
Showing with 16 additions and 4 deletions.
  1. +8 −2 mythplugins/cpsimple
  2. +8 −2 oldthemes/cpsimple
View
@@ -2,8 +2,14 @@
#
# cpsimple: recursive directory copy, then delete .svn sub dirs.
-echo cp -pr $1 $2
-cp -pr $1 $2
+if [ $(basename "$1") = $(basename "$2") -a -d $2 ]; then
+ DESTDIR=$(dirname "$2")
+else
+ DESTDIR=$2
+fi
+
+echo cp -pr $1 $DESTDIR
+cp -pr $1 $DESTDIR
echo find $2 '-name .svn -prune -exec rm -fr {} \;'
find $2 -name .svn -prune -exec rm -fr {} \;
View
@@ -2,8 +2,14 @@
#
# cpsimple: recursive directory copy, then delete .svn sub dirs.
-echo cp -pr $1 $2
-cp -pr $1 $2
+if [ $(basename "$1") = $(basename "$2") -a -d $2 ]; then
+ DESTDIR=$(dirname "$2")
+else
+ DESTDIR=$2
+fi
+
+echo cp -pr $1 $DESTDIR
+cp -pr $1 $DESTDIR
echo find $2 '-name .svn -prune -exec rm -fr {} \;'
find $2 -name .svn -prune -exec rm -fr {} \;

0 comments on commit c910264

Please sign in to comment.