mirror of
				https://github.com/panda3d/panda3d.git
				synced 2025-11-03 20:13:57 -05:00 
			
		
		
		
	generic printfiles
This commit is contained in:
		
							parent
							
								
									e2557e2204
								
							
						
					
					
						commit
						81569a2513
					
				@ -1,3 +1,3 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Install scripts for building zipfiles (leveleditor and RobotToonManager)
 | 
					// Install scripts for building zipfiles (leveleditor and RobotToonManager)
 | 
				
			||||||
#define INSTALL_SCRIPTS printdir printlib copyfiles
 | 
					#define INSTALL_SCRIPTS printdir printlib copyfiles zipfiles
 | 
				
			||||||
 | 
				
			|||||||
@ -2,32 +2,40 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if [ "$1" = "-d" ]
 | 
					if [ "$1" = "-d" ]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
    #destdir=$2
 | 
					    destdir=$2
 | 
				
			||||||
    destdir="levelEditor"
 | 
					    zipfile=$3
 | 
				
			||||||
    zipfile="levelEditor.zip"
 | 
					 | 
				
			||||||
    debug_state="-d"
 | 
					    debug_state="-d"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    #destdir=$1
 | 
					    destdir=$1
 | 
				
			||||||
    destdir="levelEditor"
 | 
					    zipfile=$2
 | 
				
			||||||
    zipfile="levelEditor.zip"
 | 
					 | 
				
			||||||
    debug_state=""
 | 
					    debug_state=""
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "${destdir}" = "" ]
 | 
					if [ "${destdir}" = "" ]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
    echo "Usage: zipfiles [-d]"
 | 
					    echo "Usage: zipfiles [-d] destdir destfile.zip"
 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -d ${destdir} ]
 | 
					if [ -d ${destdir} ]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
    echo "Removing ${destdir}"
 | 
					    echo "Removing ${destdir}"
 | 
				
			||||||
    rm -rf ${destdir}
 | 
					    echo "ERROR: destdir must not already exist"
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -f ${zipfile} ]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					    echo "Found printfiles"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    echo "Cannot find printfiles script. Run zipfiles in the same directory as printfiles"
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if mkdir ${destdir}
 | 
					if mkdir ${destdir}
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
    if copyfiles ${debug_state} ${destdir} printfiles
 | 
					    echo "Created destdir"
 | 
				
			||||||
 | 
					    if copyfiles ${debug_state} ${destdir} ./printfiles
 | 
				
			||||||
    then
 | 
					    then
 | 
				
			||||||
	if [ -f ${zipfile} ]
 | 
						if [ -f ${zipfile} ]
 | 
				
			||||||
	then
 | 
						then
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user