mirror of
				https://github.com/fspc/dswim.git
				synced 2025-10-31 08:25:35 -04:00 
			
		
		
		
	Respects non-root.
This commit is contained in:
		
							parent
							
								
									6e02dd8da4
								
							
						
					
					
						commit
						0dc3e1e2af
					
				
							
								
								
									
										52
									
								
								bin/fastswim
									
									
									
									
									
								
							
							
						
						
									
										52
									
								
								bin/fastswim
									
									
									
									
									
								
							| @ -3,33 +3,40 @@ | ||||
| require 5.004; | ||||
| use strict; | ||||
| 
 | ||||
| ################################################################################ | ||||
| #    Package administration and research tool for Debian                       # | ||||
| #    Copyright (C) 1999-2000 Jonathan D. Rosenbaum                             # | ||||
| #                                                                              # | ||||
| #    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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.# | ||||
| ################################################################################ | ||||
| ############################################################################ | ||||
| # | ||||
| #    Package administration and research tool for Debian                        | ||||
| # | ||||
| #    Copyright (C) 1999-2000 Jonathan D. Rosenbaum  | ||||
| # | ||||
| #                                                                              | ||||
| # | ||||
| #    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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,  | ||||
| #    USA | ||||
| # | ||||
| ############################################################################# | ||||
| 
 | ||||
| 
 | ||||
| # Because it is a better to write to disk, rather than trying to do | ||||
| # everthing in memory, and then it's good to close the process which | ||||
| # accomplished this.  I am sure there are better ways. | ||||
| 
 | ||||
| # Anyways if you want to test fastswim do something like this:                   | ||||
| # fastswim --transfer /var/lib/dpkg/info /tmp /var/lib/dpkg and create a         | ||||
| # transfer.deb file beforehand in /tmp which has the packagename_version         | ||||
| # Anyways if you want to test fastswim do something like this: | ||||
| # fastswim --transfer /var/lib/dpkg/info /tmp /var/lib/dpkg and create a  | ||||
| # transfer.deb file beforehand in /tmp which has the packagename_version   | ||||
| # one to a line.  | ||||
| 
 | ||||
| my @ppackage; | ||||
| @ -40,6 +47,7 @@ my $temp; | ||||
| my %HL; | ||||
| my @name; | ||||
| my %version; | ||||
| my $home = $ENV{'HOME'} . "/"; | ||||
| 
 | ||||
| #$| = 1; | ||||
| #$#name = 2000; | ||||
| @ -107,7 +115,7 @@ my %version; | ||||
|              # humm let's rebuild the offending backup list, this | ||||
|              # is important for --db. | ||||
|              unshift(@redolist,"/.");  | ||||
|              open(REDOLIST, ">$ARGV[1]/backup/$thingy.bk.bk") | ||||
|              open(REDOLIST, ">$home$ARGV[1]/backup/$thingy.bk.bk") | ||||
|              or warn "needed to edit $thingy because it lacked /., | ||||
|                       but could not open up a backup file\n"; | ||||
|                my $rd; | ||||
|  | ||||
							
								
								
									
										46
									
								
								bin/imswim
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								bin/imswim
									
									
									
									
									
								
							| @ -3,24 +3,31 @@ | ||||
| require 5.004; | ||||
| use strict; | ||||
| 
 | ||||
| ################################################################################ | ||||
| #    Package administration and research tool for Debian                       # | ||||
| #    Copyright (C) 1999-2000 Jonathan D. Rosenbaum                             # | ||||
| #                                                                              # | ||||
| #    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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.# | ||||
| ################################################################################ | ||||
| ############################################################################ | ||||
| # | ||||
| #    Package administration and research tool for Debian                        | ||||
| # | ||||
| #    Copyright (C) 1999-2000 Jonathan D. Rosenbaum  | ||||
| # | ||||
| #                                                                              | ||||
| # | ||||
| #    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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,  | ||||
| #    USA | ||||
| # | ||||
| ############################################################################# | ||||
| 
 | ||||
| 
 | ||||
| =pod | ||||
| @ -41,6 +48,7 @@ line. | ||||
| 
 | ||||
| =cut | ||||
| 
 | ||||
|     my $home = $ENV{'HOME'} . "/"; | ||||
| 
 | ||||
|    if ($#ARGV == -1) {                                                           | ||||
|      print "swim: imswim requires arguments, see program for instructions\n";                                                                       | ||||
| @ -76,7 +84,7 @@ line. | ||||
|              # humm let's rebuild the offending backup list, this                | ||||
|              # is important for --db.                                            | ||||
|              unshift(@redolist,"/.");                                            | ||||
|              open(REDOLIST, ">$ARGV[0]/backup/$the[0].list.bk.bk")         | ||||
|              open(REDOLIST, ">$home$ARGV[0]/backup/$the[0].list.bk.bk")         | ||||
|              or warn "needed to edit $the[0].list because it lacked /.,               | ||||
|                       but could not open up a backup file\n";                    | ||||
|                my $rd;                                                           | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user