about summary refs log tree commit diff stats
path: root/core/conf/ports/drivers/rsync
diff options
context:
space:
mode:
Diffstat (limited to 'core/conf/ports/drivers/rsync')
-rwxr-xr-xcore/conf/ports/drivers/rsync143
1 files changed, 0 insertions, 143 deletions
diff --git a/core/conf/ports/drivers/rsync b/core/conf/ports/drivers/rsync
deleted file mode 100755
index 14dd3e5..0000000
--- a/core/conf/ports/drivers/rsync
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/perl
-#
-# /etc/ports/drivers/rsync: rsync(1) driver script for ports(8)
-#
-
-use warnings;
-use strict;
-use File::Basename;
-
-my $host = '';
-my $collection = '';
-my $destination = '';
-my %new_checkouts;
-my %old_checkouts;
-
-sub error
-{
-	my $message = shift;
-	print "Error: $message ($!)\nUpdating failed\n";
-	exit 1;
-}
-
-sub warning
-{
-	my $message = shift;
-	print "Warning: $message ($!)\n";
-}
-
-if ($#ARGV < 0)
-{
-	print "Usage: $0 <file>\n";
-	exit 1;
-}
-
-open(FILE, $ARGV[0]) or error("Couldn't open $ARGV[0]");
-while (<FILE>)
-{
-	chomp;
-	if    (/^host=(.*)/)        { $host = $1; }
-	elsif (/^collection=(.*)/)  { $collection = $1; }
-	elsif (/^destination=(.*)/) { $destination = $1; }
-}
-close(FILE);
-
-if ($host eq '')        { error("Host field not set in $ARGV[0]");        }
-if ($collection eq '')  { error("Collection field not set in $ARGV[0]");  }
-if ($destination eq '') { error("Destination field not set in $ARGV[0]"); }
-
-if (-e "$destination/.checkouts")
-{
-	# read the old .checkouts file into memory
-	open(FILE, "$destination/.checkouts") or error("Couldn't read checkouts from $destination/.checkouts");
-	while (<FILE>)
-	{
-		chomp;
-		$old_checkouts{$_} = 1;
-	}
-	close(FILE);
-}
-
-print "Updating file list from " . $host . "::$collection\n";
-
-# get the remote file list (new .checkouts)
-open(PIPE, 'rsync -crz --no-human-readable ' . $host . '::' . $collection . '|') or error("Couldn't open pipe to rsync");
-while (<PIPE>)
-{
-	chomp;
-
-	next if /^MOTD:/;	# ignore MOTD lines
-	s/^(.{43})//;		# ignore the first 43 characters (mode, date etc...)
-	next if /^.$/;		# ignore the . directory
-
-	$new_checkouts{$_} = 1;
-}
-close(PIPE);
-error("Running rsync failed") unless $? == 0;
-
-print "Updating collection " . basename($destination) . "\n";
-
-# now really run rsync
-open(PIPE, 'rsync -crz --no-human-readable --log-format "%o %n" ' . $host . "::$collection $destination|") or error("Couldn't open pipe to rsync");
-while (<PIPE>)
-{
-	chomp;
-
-	if (/^recv (.*)/)
-	{
-		if ($old_checkouts{$1})
-		{
-			s/^recv/ Edit/;
-		}
-		else
-		{
-			s/^recv/ Checkout/;
-		}
-	}
-
-	print $_ . "\n";
-}
-close(PIPE);
-error("Running rsync failed") unless $? == 0;
-
-# save new checkouts into .checkouts
-open(FILE, ">$destination/.checkouts") or error("Couldn't save checkouts to $destination/.checkouts");
-foreach my $checkout (sort keys %new_checkouts)
-{
-	print FILE "$checkout\n";
-}
-close(FILE);
-
-# use chroot as an additional safety measure when removing files
-chroot($destination) or error("Couldn't chroot into $destination");
-chdir('/');
-
-# iterate through old checkouts, remove obsolete files
-foreach my $checkout (sort keys %old_checkouts)
-{
-	if (!$new_checkouts{$checkout})
-	{
-		if (-f $checkout)
-		{
-			print " Delete $checkout\n";
-			unlink($checkout) or warning("Couldn't delete $checkout");
-		}
-	}
-}
-
-# iterate through old checkouts, remove obsolete directories
-foreach my $checkout (sort keys %old_checkouts)
-{
-	if (!$new_checkouts{$checkout})
-	{
-		if (-d $checkout)
-		{
-			print " Delete $checkout\n";
-			rmdir($checkout) or warning("Couldn't delete $checkout");
-		}
-	}
-}
-
-print "Finished successfully\n";
-
-# End of file
author arg@10ksloc.org <unknown> 2006-08-07 08:46:11 +0200 committer arg@10ksloc.org <unknown> 2006-08-07 08:46:11 +0200 added stripping to dwm target in Makefile' href='/acidbong/suckless/dwm/commit/Makefile?id=82064af2d7076045980c694241cf0326aea7e7e2'>82064af ^
1076f2b

4d55eee ^
db876f9 ^
dbf7e03 ^

4d55eee ^






dbf7e03 ^

4d55eee ^
dbf7e03 ^
4d55eee ^


dbf7e03 ^
d9386a0 ^
4d55eee ^
dbf7e03 ^

4d55eee ^



dc5c070 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
                              



                                    
                                                        
                  
 
                
 
        
                                


                                     
                                
 



                              
                                
 
         

                                               
 
           
                   
                                      
                 

      
                      
                                               

           






                                                             

            
                                                                   
                                         


                                                                   
                                             
                                                                                 
                                                    

          



                                                                   

                                                
# dwm - dynamic window manager
#   (C)opyright MMVI Anselm R. Garbe

include config.mk

SRC = client.c draw.c event.c main.c tag.c util.c view.c
OBJ = ${SRC:.c=.o}

all: options dwm

options:
	@echo dwm build options:
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
	@echo "CC       = ${CC}"
	@echo "LD       = ${LD}"

.c.o:
	@echo CC $<
	@${CC} -c ${CFLAGS} $<

${OBJ}: dwm.h config.h config.mk

config.h:
	@echo creating $@ from config.default.h
	@cp config.default.h $@

dwm: ${OBJ}
	@echo LD $@
	@${LD} -o $@ ${OBJ} ${LDFLAGS}
	@strip $@

clean:
	@echo cleaning
	@rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz

dist: clean
	@echo creating dist tarball
	@mkdir -p dwm-${VERSION}
	@cp -R LICENSE Makefile README config.*.h config.mk \
		dwm.1 dwm.h ${SRC} dwm-${VERSION}
	@tar -cf dwm-${VERSION}.tar dwm-${VERSION}
	@gzip dwm-${VERSION}.tar
	@rm -rf dwm-${VERSION}

install: all
	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
	@mkdir -p ${DESTDIR}${PREFIX}/bin
	@cp -f dwm ${DESTDIR}${PREFIX}/bin
	@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
	@sed 's/VERSION/${VERSION}/g' < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1

uninstall:
	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
	@rm -f ${DESTDIR}${PREFIX}/bin/dwm
	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
	@rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1

.PHONY: all options clean dist install uninstall