trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mitchell...@apache.org
Subject [1/2] incubator-trafficcontrol git commit: fix portal build script
Date Mon, 03 Jul 2017 16:39:48 GMT
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 583d8c036 -> 9e94ce376


fix portal build script


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/b5757129
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/b5757129
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/b5757129

Branch: refs/heads/master
Commit: b5757129848e00c542608146804e46325612c932
Parents: 583d8c0
Author: Dan Kirkwood <dangogh@gmail.com>
Authored: Mon Jul 3 10:23:01 2017 -0600
Committer: Jeremy Mitchell <mitchell852@gmail.com>
Committed: Mon Jul 3 10:38:45 2017 -0600

----------------------------------------------------------------------
 traffic_portal/build/build_rpm.sh | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b5757129/traffic_portal/build/build_rpm.sh
----------------------------------------------------------------------
diff --git a/traffic_portal/build/build_rpm.sh b/traffic_portal/build/build_rpm.sh
index 9542f14..a30f6f0 100755
--- a/traffic_portal/build/build_rpm.sh
+++ b/traffic_portal/build/build_rpm.sh
@@ -13,15 +13,14 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+#
 
+#----------------------------------------
 function importFunctions() {
 	local script=$(readlink -f "$0")
-	local suff=${script##*control/}
-	local tcdirlen=$[${#script} - ${#suff}]
-	export TC_DIR=${script:0:$tcdirlen}
 	local scriptdir=$(dirname "$script")
-	export TS_DIR=$(dirname "$scriptdir")
-
+	export TP_DIR=$(dirname "$scriptdir")
+	export TC_DIR=$(dirname "$TP_DIR")
 	functions_sh="$TC_DIR/build/functions.sh"
 	if [[ ! -r $functions_sh ]]; then
 		echo "error: can't find $functions_sh"
@@ -30,21 +29,22 @@ function importFunctions() {
 	. "$functions_sh"
 }
 
-#----------------------------------------
+
+# ---------------------------------------
 function initBuildArea() {
 	echo "Initializing the build area."
 	mkdir -p "$RPMBUILD"/{SPECS,SOURCES,RPMS,SRPMS,BUILD,BUILDROOT} || { echo "Could not create
$RPMBUILD: $?"; exit 1; }
 
 	# tar/gzip the source
 	local ts_dest=$(createSourceDir traffic_portal)
-	cd "$TS_DIR" || \
-		 { echo "Could not cd to $TS_DIR: $?"; exit 1; }
+	cd "$TP_DIR" || \
+		 { echo "Could not cd to $TP_DIR: $?"; exit 1; }
 	rsync -av ./ "$ts_dest"/ || \
 		 { echo "Could not copy to $to_dest: $?"; exit 1; }
-	cp -r "$TS_DIR"/ "$ts_dest" || { echo "Could not copy $TS_DIR to $ts_dest: $?"; exit 1;
}
+	cp -r "$TP_DIR"/ "$ts_dest" || { echo "Could not copy $TP_DIR to $ts_dest: $?"; exit 1;
}
 
 	tar -czvf "$ts_dest".tgz -C "$RPMBUILD"/SOURCES $(basename $ts_dest) || { echo "Could not
create tar archive $ts_dest.tgz: $?"; exit 1; }
-	cp "$TS_DIR"/build/*.spec "$RPMBUILD"/SPECS/. || { echo "Could not copy spec files: $?";
exit 1; }
+	cp "$TP_DIR"/build/*.spec "$RPMBUILD"/SPECS/. || { echo "Could not copy spec files: $?";
exit 1; }
 
 	echo "The build area has been initialized."
 }


Mime
View raw message