mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-25 00:15:43 +00:00 
			
		
		
		
	- removed many of the v options on the tar cmds to build are not as verbose - removed an extra fi in xcat.spec %post git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@984 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| OSNAME=$(uname)
 | |
| version='2.0'
 | |
| 
 | |
| if [ "$OSNAME" = "AIX" ]
 | |
| then
 | |
| 	echo '.svn' > /tmp/xcat-excludes
 | |
|     tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-web.tar xCAT-web
 | |
|     gzip -f /opt/freeware/src/packages/SOURCES/xCAT-web.tar
 | |
|     cd ./xCAT-web
 | |
|     rm -f /opt/freeware/src/packages/SRPMS/xCAT-web*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm
 | |
|     rpm -ba xCAT-web.spec
 | |
|     #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm
 | |
| 
 | |
| else
 | |
| 	if [ -f /etc/redhat-release ]
 | |
| 	then
 | |
|    		pkg="redhat"
 | |
| 	else
 | |
|    		pkg="packages"
 | |
| 	fi
 | |
| 	source=$PWD
 | |
| 
 | |
| 	# Trying to avoid having the version # (2.0) on the xCAT-web dir name in svn
 | |
| 	set -x
 | |
| 	cd /usr/src/$pkg/SOURCES
 | |
| 	rm -f xCAT-web-$version; ln -s $source/xCAT-web xCAT-web-$version   # have to make tar think it is in xCAT-web-2.0
 | |
| 	rm -f xCAT-web-$version.tar.gz
 | |
| 	tar -czhf xCAT-web-$version.tar.gz --exclude=.svn --exclude=.project xCAT-web-$version
 | |
| 	rm -f /usr/src/$pkg/SRPMS/xCAT-web-$version*rpm /usr/src/$pkg/RPMS/noarch/xCAT-web-$version*rpm
 | |
| 	rpmbuild -ta xCAT-web-$version.tar.gz
 | |
| 	#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-web-$version*rpm
 | |
| fi
 |