Make build script independent of working dir 86/26486/1
authorDaniel Farrell <dfarrell@redhat.com>
Thu, 3 Sep 2015 21:40:57 +0000 (17:40 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Thu, 3 Sep 2015 21:50:39 +0000 (17:50 -0400)
This was the last part of the helper scripts that had a dependency on
the CWD of the user running the scripts.

`/vagrant/build.sh` now works, vs having to cd and `./build.sh`.

Change-Id: I408bf5d5953260fc5cf5dbb100363526080af9ca
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
rpm/build.sh

index 0fb1634307fae79fd8a8f05041575cd7f7c67ace..9d55d32ebc9b54192f542d294caab33d71a9d61d 100755 (executable)
@@ -31,6 +31,7 @@ unitfile_tarball="opendaylight-systemd-$sysd_commit.tar.gz"
 # Common paths used in this script
 odl_tb_cache_path="$cache_dir/$odl_tarball"
 unitfile_cache_path="$cache_dir/$unitfile_tarball"
+specfile_path="$cache_dir/opendaylight.spec"
 srpm_out_path="$HOME/rpmbuild/SRPMS/$odl_srpm"
 rpm_out_path="$HOME/rpmbuild/RPMS/noarch/$odl_rpm"
 odl_tb_url="https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/$odl_version/$odl_tarball"
@@ -72,7 +73,7 @@ fi
 cp $unitfile_cache_path $rpmbuild_src_dir
 
 # Put ODL RPM .spec file in rpmbuild's SPECS dir
-cp opendaylight.spec $rpmbuild_spec_dir
+cp $specfile_path $rpmbuild_spec_dir
 
 # Build ODL SRPM and noarch RPM
 # Override disttag from .el7.centos to .el7 per best-practices/expected norms