tdiesler commented on code in PR #5573:
URL: https://github.com/apache/camel-k/pull/5573#discussion_r1624862817


##########
e2e/knative/files/setup.sh:
##########
@@ -0,0 +1,244 @@
+#!/bin/bash
+
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+# ---------------------------------------------------------------------------
+
+####
+#
+# This script takes care of Knative setup
+#
+####
+
+KNATIVE_VERSION=1.14.0
+YQ_VERSION=4.44.1
+
+TIMEOUT="150s"
+
+set -e
+
+# Get the os/arch
+ARCH=$(uname -m)
+OS=$(uname -s | tr '[:upper:]' '[:lower:]')
+
+# Check/Install: yq
+#
+
+SUDO=${SUDO:-sudo}
+
+echo -n "Checking yq ... "
+if which yq > /dev/null 2>&1; then
+  echo "ok"
+else
+  yq="yq_${OS}_${ARCH}"
+  echo "installing ${yq}-v${YQ_VERSION}"
+  ${SUDO} wget 
https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/${yq} -O 
/usr/bin/yq && ${SUDO} chmod +x /usr/bin/yq

Review Comment:
   At this stage, the script will fail with a detailed message when something 
goes wrong. In case you want to have control over the install dir, you can 
always provide yq your self before you run the script.
   e.g. I did `brew install yq`
   
   Perhaps you have some other security concern that I'm missing here, have you?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to