Commit 6c43fff5 authored by Michael Völske's avatar Michael Völske
parents 5490c38c ce5ac1cb
...@@ -57,16 +57,16 @@ main() { ...@@ -57,16 +57,16 @@ main() {
rm $tmp rm $tmp
deleted_directories_directory=/tmp/webis-cvs-update-$(date "+%Y-%m-%d-%H-%M-%S") deleted_directories_directory=/tmp/webis-cvs-update-${PWD##*/}-$(date "+%Y-%m-%d-%H-%M-%S")
cvs -q update -dP -I "*.log" -I "*.swp" -I "*.bak" -I "bin*" 2>&1 \ cvs -q update -dP -I "*.log" -I "*.swp" -I "*.bak" -I "bin*" 2>&1 \
| while read line;do | while read line; do
if [[ "$line" == "cvs update: skipping directory "* ]];then if [[ "$line" == "cvs update: skipping directory "* ]]; then
dir=`echo "$line" | awk '{print $5}'` dir=`echo "$line" | awk '{print $5}'`
echo -e "${BLUE}Moving remotely deleted directory${NO_COLOR} $dir to $deleted_directories_directory/$directory" echo -e "${BLUE}Moving remotely deleted directory${NO_COLOR} $dir to $deleted_directories_directory/$dir"
sed -i "/^D\/`basename $dir`\/\/\/\/$/d" `dirname $dir`/CVS/Entries sed -i "/^D\/`basename $dir`\/\/\/\/$/d" `dirname $dir`/CVS/Entries
# rm -rf $dir
mkdir -p $deleted_directories_directory mkdir -p $deleted_directories_directory
mv $dir $deleted_directories_directory rsync -a --relative --remove-source-files $dir $deleted_directories_directory
find . -depth -type d -empty -delete
else else
case $line in case $line in
A*) A*)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment