Ticket #13504: 0005-cleanup-remove-cpsvndir-cpsimple-scripts-from-html.patch

File 0005-cleanup-remove-cpsvndir-cpsimple-scripts-from-html.patch, 2.1 KB (added by Gary Buhrmaster, 4 years ago)
  • deleted file mythtv/html/cpsvndir

    From fe58f2da576c52fbe4a8ecf98db81bec7e20096f Mon Sep 17 00:00:00 2001
    From: Gary Buhrmaster <gary.buhrmaster@gmail.com>
    Date: Thu, 7 Nov 2019 16:23:00 +0000
    Subject: [PATCH 5/6] cleanup: remove cpsvndir/cpsimple scripts from html
    
    ---
     mythtv/html/cpsvndir | 66 --------------------------------------------
     1 file changed, 66 deletions(-)
     delete mode 100644 mythtv/html/cpsvndir
    
    diff --git a/mythtv/html/cpsvndir b/mythtv/html/cpsvndir
    deleted file mode 100644
    index 8486a616cc..0000000000
    + -  
    1 #!/bin/sh
    2 #
    3 # cpsvndir: recursive directory copy excluding .svn sub dirs.
    4 
    5 if [ -z "$1" -o -z "$2" ]; then
    6     echo "Usage: $0 source-dir destination-dir"
    7     exit -1
    8 fi
    9 
    10 # Some shells don't set EUID
    11 if [ -z "$EUID" ]; then
    12     if [ -x /usr/bin/id ]; then EUID=`id -u` ;fi
    13     if [ -z "$EUID" ];     then EUID=$USER   ;fi
    14     if [ -z "$EUID" ];     then EUID=0       ;fi  # Will fail if not root
    15 fi
    16 
    17 # Do similarly for EGID
    18 if [ -z "$EGID" ]; then
    19     if [ -x /usr/bin/id ]; then EGID=`id -g` ;fi
    20     if [ -z "$EGID" ];     then EGID=0       ;fi  # Will fail if not root
    21 fi
    22 
    23 BASE=$(basename "$1")
    24 case "$BASE" in
    25     .|..|/)  BASE="" ;;
    26     *)       BASE="/$BASE" ;;
    27 esac
    28 
    29 SRC="$1"
    30 
    31 case "$2" in
    32     /*) DEST="$2$BASE" ;;
    33     *)  DEST="$(pwd)/$2$BASE" ;;
    34 esac
    35 
    36 #echo "BASE=$BASE SRC=$SRC DEST=$DEST"
    37 
    38 IFS='
    39 '
    40 if [ ! -z ${MYTHPYTHON} ]; then
    41     if [ ! -f ${MYTHPYTHON} ]; then
    42         MYTHPYTHON="/usr/bin/env ${MYTHPYTHON}"
    43     fi
    44 fi
    45 
    46 # Copy all files and directories except .svn
    47 cd "$SRC"
    48 for file in $(find . -name .svn -prune -or -print); do
    49     #echo "processing $file"
    50     if [ -d "$file" -a ! -L "$file" ]; then
    51         mkdir -p "$DEST/$file"
    52     else
    53         cp -pR "$file" "$DEST/$file"
    54         ext=${file##*.}
    55         if [ "x$ext" = "xpy" ]; then
    56             sed "1s%^#.*%#!${MYTHPYTHON}%" "$file" > "$DEST/$file"
    57 #        elif [ "x$ext" = "xpl" ]; then
    58 #            do some perly stuff
    59         fi
    60         chown -h $EUID:$EGID "$DEST/$file"
    61         chmod +r "$DEST/$file" &> /dev/null
    62     fi
    63 done
    64 
    65 exit 0
    66