From cae8f7447aef7646aab46c5e5e015361f8bc53db Mon Sep 17 00:00:00 2001 From: upstream svn Date: Fri, 9 Sep 2016 08:48:17 +0000 Subject: [PATCH] Remove unneeded, CVS-specific script --- .svn-revision | 2 +- src/utils/scripts/linkcvs | 146 ---------------------------------------------- 2 files changed, 1 insertion(+), 147 deletions(-) delete mode 100755 src/utils/scripts/linkcvs diff --git a/.svn-revision b/.svn-revision index 703ee0a7..46e1e863 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10950 +10951 diff --git a/src/utils/scripts/linkcvs b/src/utils/scripts/linkcvs deleted file mode 100755 index 6ed82f04..00000000 --- a/src/utils/scripts/linkcvs +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/bash - -# This file is part of the aMule project. -# -# Copyright (c) 2003-2011 aMule Team ( admin@amule.org / http://www.amule.org ) -# Copyright (c) 2004-2011 Jacobo Vilella (Jacobo221) -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -# - -################################################################### -# # -# linkcvs will link the whole cvs tree to the given path # -# allowing keeping several compilations from a single cvs tree # -# # -# Warning: This script overwrites old files in target_path # -# # -################################################################### -# # -# Script valid as of 4rd June 2004 aMule CVS # -# Suggestions go to Jacobo221 at @amule dot .org # -# # -################################################################### -# # -# This code is distributed under terms of the GPL License # -# http://www.gnu.org/copyleft/gpl.html # -# # -################################################################### -# # -# EXEC is a list of the files which will be called as scripts # -# EXEC_NUMBER is the amount of EXEC files in the list # -# EXEC_PREFIX is the command to prefix the call of the EXEC # -# EXEC_POSTFIX is the command to postfix the call of the EXEC # -# COPY is a list of files which will be copies, not linked # -# Priviledge order (max to min): EXEC, COPY, CVS # -# # -################################################################### - -EXEC_NUMBER=0 -# The follwing four lines were needed for aMule versions previous to 2.0.0 -# EXEC_NUMBER=1 -# EXEC=("autogen.sh") -# EXEC_PREFIX=("original=\`readlink src/SharedFileList.h\` && cp -d --remove-destination \"\$original\" src/ && ") -# EXEC_POSTFIX=("ln -sf \"\$original\" src/SharedFileList.h") -COPY="" - -if [ $# -ne 2 ]; then - echo "`basename $0`: invalid number of arguments" - echo "Try \``basename $0` '" - exit 1 -elif [ ! -e "$1" ]; then - echo "`basename $0`: $1 doesn't exist!" - exit 2 -elif [ ! -d "${1}/CVS" ]; then - echo "`basename $0`: $1 isn't a CVS tree!" - exit 3 -elif [ ! -e "${1}/CVS/Entries" ]; then - echo "`basename $0`: $1 has no Entries file!" - exit 4 -fi - -SOURCE="$1" -TARGET="$2" - -if [ "`echo \"$SOURCE\" | cut -c 1`" != "/" ] && [ "`echo \"$SOURCE\" | cut -c 1`" != "~" ]; then - SOURCE="`pwd`/$SOURCE" -fi -if [ "`echo \"$TARGET\" | cut -c 1`" != "/" ] && [ "`echo \"$TARGET\" | cut -c 1`" != "~" ]; then - TARGET="`pwd`/$TARGET" -fi - -cvs_rec() -{ - local FILES=`cat "${SOURCE}/$1"/CVS/Entries | cut -f 2 -d "/" -s` - # Alternative option would be to place `grep "^D/"` and `grep "^"` - for file in $FILES; do - if [ -d "${SOURCE}/${1}/$file" ]; then - mkdir -p "${TARGET}/${1}/$file" - cvs_rec "${1}/$file" - else - target="${TARGET}/${subfile/$SOURCE}/${1}" - if [ ! -e "${SOURCE}/${1}/$file" ]; then - echo "${SOURCE}/${1}/$file not found!" - else - ln -sf "${SOURCE}/${1}/$file" "$target" - fi - fi - done -} - -if [ ! -e "$TARGET" ]; then - echo -n "$TARGET doesn't exist. Should I create it? [y/n]" - read -s -n 1 opt - if [ $opt = Y -o $opt = y ]; then - echo " Copying..." - mkdir -p "$TARGET" - else - echo "`basename $0`: target_path invalid" - exit 5 - fi -fi - -cvs_rec "" - -for file in $COPY; do - mkdir -p "${TARGET}/`dirname $file`" - for subfile in ${SOURCE}/$file; do - if [ ! -e "$subfile" ]; then - echo "$subfile not found!" - else - # -d --remove-destination is esential for links handling - cp -d --remove-destination "$subfile" "${TARGET}/${subfile/$SOURCE}" - fi - done -done - -i=0 -while [ "$i" -lt "$EXEC_NUMBER" ]; do - mkdir -p "${TARGET}/`dirname $file`" - for subfile in "${SOURCE}"/${EXEC[$i]}; do - if [ ! -e "$subfile" ]; then - echo "$subfile not found!" - else - target="${TARGET}/${subfile/$SOURCE}" - rm -f "$target" # Necessary in case $target is a link - echo ${EXEC_PREFIX[$i]} > "$target" - echo -n "$subfile && " >> "$target" - echo ${EXEC_POSTFIX[$i]} >> "$target" - chmod a+x "$target" - fi - done - i=`expr $i + 1` -done - -- 2.11.4.GIT