|  |  | 
 
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  | 
	
		
   
   
      | General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics. Do not post support topics here.
 |  
	
	
		
	
	
	| 
			
			 
			
				07-19-2016, 01:42 PM
			
			
			
		 |  
	| 
		
			
			| Sarnak |  | 
					Join Date: May 2014 
						Posts: 79
					      |  |  
	| 
				 eqemu_update.pl keeps asking if I want to update 
 I am running eqemu_update.pl to update the quests. But, the process keeps asking me if I want to update specific quests, and I have to type 'yes' and <enter> every time. Can I make it just automatically update all quests? |  
	
		
	
	
	| 
			
			 
			
				07-19-2016, 01:50 PM
			
			
			
		 |  
	| 
		
			|  | Administrator |  | 
					Join Date: Feb 2009 Location: MN 
						Posts: 2,072
					      |  |  
	| 
 Just hold enter until it's done.
 The point is so that it doesn't overwrite custom changes, or you have the option to decide if you want to overwrite
 |  
	
		
	
	
 
  |  |  |  |  
	| 
			
			 
			
				07-19-2016, 02:25 PM
			
			
			
		 |  
	| 
		
			|  | Dragon |  | 
					Join Date: Aug 2012 Location: Hershey, PA 
						Posts: 499
					      |  |  
	| 
				  
 eqemu_update.pl 
replace sub quest_files_fetch subroutine with the following:
 
	Code: sub quest_files_fetch{
	if (!-e "updates_staged/Quests-Plugins-master/quests/") {
		print "\n --- Fetching Latest Quests --- \n";
		get_remote_file("https://github.com/EQEmu/Quests-Plugins/archive/master.zip", "updates_staged/Quests-Plugins-master.zip", 1);
		print "\nFetched latest quests...\n";
		mkdir('updates_staged');
		unzip('updates_staged/Quests-Plugins-master.zip', 'updates_staged/');
	}
	$updateall = false;
	$fc = 0;
	use File::Find;
	use File::Compare;
	
	my @files;
	my $start_dir = "updates_staged/Quests-Plugins-master/quests/";
	find( 
		sub { push @files, $File::Find::name unless -d; }, 
		$start_dir
	);
	for my $file (@files) {
		if($file=~/\.pl|\.lua|\.ext/i){
			$staged_file = $file;
			$dest_file = $file;
			$dest_file =~s/updates_staged\/Quests-Plugins-master\///g;
			
			if (!-e $dest_file) {
				copy_file($staged_file, $dest_file);
				print "Installing :: '" . $dest_file . "'\n";
				$fc++;
			}
			
			else{
				$diff = do_file_diff($dest_file, $staged_file);
				$backup_dest = "updates_backups/" . $time_stamp . "/" . $dest_file;
				if($diff ne ""){
					if ($updateall){
						#::: Make a backup
						copy_file($dest_file, $backup_dest);
						#::: Copy staged to running
						copy($staged_file, $dest_file);
						print "Installing :: '" . $dest_file . "'\n\n";
					}
					else{
						print $diff . "\n";
						print "\nFile Different :: '" . $dest_file . "'\n";
						print "\nDo you wish to update this Quest? '" . $dest_file . "' [Yes (Enter) - No (N) - Update All (A)] \nA backup will be found in '" . $backup_dest . "'\n";
						my $input = <STDIN>;
						if($input=~/Y/i){
							#::: Make a backup
							copy_file($dest_file, $backup_dest);
							#::: Copy staged to running
							copy($staged_file, $dest_file);
							print "Installing :: '" . $dest_file . "'\n\n";
						}
						elsif($input=~/A/i){
							print "\nChoosing this option will overwrite ALL quests different from master (i.e. overwrite custom quests) [Type YES if certain] \n";
							my $input = <STDIN>;
							if($input=~/YES/i){$updateall = true;}
							#::: Make a backup
							copy_file($dest_file, $backup_dest);
							#::: Copy staged to running
							copy($staged_file, $dest_file);
							print "Installing :: '" . $dest_file . "'\n\n";
						}
						else{
						}
					}
				$fc++;
				}
			}
		}
	}
	rmtree('updates_staged');
	if($fc == 0){
		print "\nNo Quest Updates found... \n\n";
	}
} Not the prettiest thing and I didn't check output (print) syntax format, but, in the case you just want to make a pot of coffee or something while it updates ALL quests files that are different from master (including custom quests by the same name), then there ya go.
			
			
			
			
				  |  
 
  |  |  |  |  
	
		
	
	
	| 
			
			 
			
				07-19-2016, 03:56 PM
			
			
			
		 |  
	| 
		
			
			| Sarnak |  | 
					Join Date: May 2014 
						Posts: 79
					      |  |  
	| 
 Great. Thank you. I just wanted to make sure that I wasn't doing something wrong. Everything else runs so smoothly.   |  
	
		
	
	
	| 
			
			 
			
				07-19-2016, 04:15 PM
			
			
			
		 |  
	| 
		
			|  | Discordant |  | 
					Join Date: May 2016 Location: Above Hell 
						Posts: 400
					      |  |  
	| 
 If I'm not mistaken, when doing updates for quests, even if you let it overwritethe custom quests, it backs up your old ones ? I haven't ran that update in
 awhile, but I thought it did.
 |  
	
		
	
	
	| 
			
			 
			
				07-19-2016, 04:18 PM
			
			
			
		 |  
	| 
		
			|  | Dragon |  | 
					Join Date: Aug 2012 Location: Hershey, PA 
						Posts: 499
					      |  |  
	| 
 Yes, it does, however, it does overwrite the ones that EQEMU uses.  Semantics. <grin> |  
	
		
	
	
	| 
			
			 
			
				07-19-2016, 04:25 PM
			
			
			
		 |  
	| 
		
			|  | Discordant |  | 
					Join Date: May 2016 Location: Above Hell 
						Posts: 400
					      |  |  
	| 
 Myself, running any updates from that script, I do it from a server test folder first, just tosee what's up before I run it on my main custom server.
 |  
	
		
	
	
	| 
			
			 
			
				07-19-2016, 04:37 PM
			
			
			
		 |  
	| 
		
			|  | Administrator |  | 
					Join Date: Feb 2009 Location: MN 
						Posts: 2,072
					      |  |  
	| 
 
	Quote: 
	
		| 
					Originally Posted by DanCanDo  If I'm not mistaken, when doing updates for quests, even if you let it overwritethe custom quests, it backs up your old ones ? I haven't ran that update in
 awhile, but I thought it did.
 |  Yes, after having run custom servers for years myself, I don't want a quest update to overwite something that I have customly put in a zone and have it be gone forever.
 
You're welcome |  
	
		
	
	
	| 
			
			 
			
				07-19-2016, 05:47 PM
			
			
			
		 |  
	| 
		
			|  | Discordant |  | 
					Join Date: May 2016 Location: Above Hell 
						Posts: 400
					      |  |  
	| 
 
	Quote: 
	
		| 
					Originally Posted by Akkadius  Yes, after having run custom servers for years myself, I don't want a quest update to overwite something that I have customly put in a zone and have it be gone forever.
 You're welcome
 |  Thank You   |  
	
		
	
	
	
	
	| 
	|  Posting Rules |  
	| 
		
		You may not post new threads You may not post replies You may not post attachments You may not edit your posts 
 HTML code is Off 
 |  |  |  All times are GMT -4. The time now is 08:20 AM.
 
 |  |  
    |  |  |  |  
    |  |  |  |  
     |  |  |  |  
 |  |