Ticket #6772: cpsvndir_mythplugins2.patch

File cpsvndir_mythplugins2.patch, 2.0 KB (added by mythtv@…, 15 years ago)

Make "cp" parameters OSX friendly

  • mytharchive/mytharchive/mytharchive.pro

     
    2727SOURCES += mythburn.cpp themeselector.cpp editmetadata.cpp thumbfinder.cpp
    2828SOURCES += exportnative.cpp importnative.cpp
    2929
     30QMAKE_COPY_DIR = sh ../../cpsvndir
     31
    3032burnuifiles.path = $${SYSROOT}$${PREFIX}/share/mythtv/themes/default
    3133burnuifiles.files = mythburn-ui.xml
    3234
  • cpsvndir

     
     1#!/bin/sh
     2#
     3# cpsvndir: recursive directory copy excluding .svn sub dirs.
     4
     5
     6if [ -z "$1" -o -z "$2" ]; then
     7    echo "Usage: $0 source-dir destination-dir"
     8    exit -1
     9fi
     10
     11# Some shells don't set EUID
     12if [ -z "$EUID" ]; then
     13    if [ -x /usr/bin/id ]; then EUID=`id -u` ;fi
     14    if [ -z "$EUID" ];     then EUID=$USER   ;fi
     15    if [ -z "$EUID" ];     then EUID=0       ;fi  # Will fail if not root
     16fi
     17
     18# Build directory structure
     19IFS=$'\012'
     20for directory in $(find "$1" -path '*/.svn' -prune -or -type d -print); do
     21    mkdir -p "$2/${1##*/}/${directory/#$1}"
     22done
     23
     24# Copy files
     25for file in $(find "$1" -path '*/.svn' -prune -or ! -type d -print); do
     26    cp -pR "$file" "$2/${1##*/}/${file/#$1}"
     27    chown $EUID "$2/${1##*/}/${file/#$1}" &> /dev/null
     28    chmod +r "$2/${1##*/}/${file/#$1}" &>/dev/null
     29done
     30
     31exit 0
  • mythweather/mythweather/mythweather.pro

     
    1313INCLUDEPATH += $${PREFIX}/include/mythtv
    1414INCLUDEPATH += $${PREFIX}/include/mythtv/libmythui
    1515
     16QMAKE_COPY_DIR = sh ../../cpsvndir
     17
    1618datafiles.path = $${PREFIX}/share/mythtv/mythweather/
    1719datafiles.files = weather-screens.xml
    1820installscripts.path = $${PREFIX}/share/mythtv/mythweather/scripts