mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-25 00:15:43 +00:00 
			
		
		
		
	git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3329 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| OSNAME=$(uname)
 | |
| VER=`cat Version`
 | |
| 
 | |
| if [ "$OSNAME" = "AIX" ]
 | |
| then
 | |
| 
 | |
|         #source=$PWD
 | |
|         #cd /opt/freeware/src/packages/SOURCES
 | |
|         #rm -f perl-xCAT-$VER; ln -s $source/perl-xCAT perl-xCAT-$VER
 | |
|         #rm -f /opt/freeware/src/packages/SRPMS/perl-xCAT*rpm /opt/freeware/src/packages/RPMS/ppc/perl-xCAT*rpm
 | |
|         #echo '.svn' > /tmp/xcat-excludes
 | |
|         #tar -X /tmp/xcat-excludes -cf perl-xCAT-$VER.tar perl-xCAT-$VER
 | |
|         #gzip -f /opt/freeware/src/packages/SOURCES/perl-xCAT-$VER.tar
 | |
|         #cd $source/perl-xCAT
 | |
|         #rpm -ba perl-xCAT.spec
 | |
|         
 | |
|         source=/opt/freeware/src/packages
 | |
|         echo '.svn' > /tmp/xcat-excludes
 | |
|         tar -X /tmp/xcat-excludes -cf $source/SOURCES/perl-xCAT-$VER.tar perl-xCAT
 | |
|         gzip -f $source/SOURCES/perl-xCAT-$VER.tar
 | |
|         rm -f $source/SRPMS/perl-xCAT*rpm $source/RPMS/ppc/perl-xCAT*rpm
 | |
|         rpm -ba perl-xCAT/perl-xCAT.spec
 | |
|         #rpm -ta $source/SOURCES/perl-xCAT-$VER.tar.gz
 | |
| else
 | |
| 	if [ -f /etc/redhat-release ]
 | |
| 	then
 | |
|    		pkg="redhat"
 | |
| 	else
 | |
|    		pkg="packages"
 | |
| 	fi
 | |
| 
 | |
| 	set -x
 | |
| 	
 | |
|     svn info > perl-xCAT/.svninfo
 | |
| 	tar  --exclude .svn -czhf /usr/src/$pkg/SOURCES/perl-xCAT-$VER.tar.gz perl-xCAT;
 | |
|     rm perl-xCAT/.svninfo
 | |
| 	rm -f /usr/src/$pkg/SRPMS/perl-xCAT-$VER*rpm /usr/src/$pkg/RPMS/noarch/perl-xCAT-$VER*rpm
 | |
| 	rpmbuild -ta /usr/src/$pkg/SOURCES/perl-xCAT-$VER.tar.gz
 | |
| 	
 | |
| fi
 |