[mythtv] issues with 16491?
Nigel Pearson
nigel at ind.tansu.com.au
Wed Mar 19 02:55:37 UTC 2008
> Anyway, I've attached my suggested approach.
...
> +OWNER=$EUID
> +
> +# Some shells don't set EUID
> +if [ -z "$OWNER" ]; then
> + if [ -x /usr/bin/id ]; then
> + OWNER=`id -u`
Not bad, but we might as well assign EUID and save another var?
% svn diff themes/cpsvndir
Index: themes/cpsvndir
===================================================================
--- themes/cpsvndir (revision 16692)
+++ themes/cpsvndir (working copy)
@@ -5,6 +5,23 @@
DESTDIR=$2
SOURCE=$1
+if [ -z "$1" -o -z "$2" ]; then
+ echo "Usage: $0 source-dir destination-dir"
+ exit -1
+fi
+
+# Some shells don't set EUID
+if [ -z "$EUID" ]; then
+ if [ -x /usr/bin/id ]; then
+ EUID=`id -u`
+ else
+ EUID=$USER
+ fi
+fi
+# A real last-resort, which will fail if not doing make install as
root:
+if [ -z "$EUID" ] EUID=0
+
+
mkdir -p $DESTDIR/$SOURCE || exit 1
find $SOURCE -path '*/.svn' -prune -or -type d -exec mkdir -p
$DESTDIR/{} \;
--
Nigel Pearson, nigel at ind.tansu.com.au|"Beware - I am a carrier
Telstra Net. Eng., Sydney, Australia | of surrealism"
Office: 9202 3900 Fax: 9261 3912 | D A
Mobile: 0408 664435 Home: 9792 6998 | L I
More information about the mythtv-dev
mailing list