You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/02/25 18:10:10 UTC

[GitHub] [accumulo] slackwinner commented on a change in pull request #1910: Adding JShell Accumulo Feature

slackwinner commented on a change in pull request #1910:
URL: https://github.com/apache/accumulo/pull/1910#discussion_r583055100



##########
File path: assemble/conf/create-jshell.sh
##########
@@ -0,0 +1,134 @@
+#! /usr/bin/env 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.
+#
+
+function addLicenseHeader(){
+  export header="$1"
+  export jPath="$2"
+  
+  # Does an auto-generated JShell config file exists?
+  if [[ -e "$jPath" ]]; then
+    printf "%s\n" "/*" >> "$jPath"
+    
+    # Load in license header
+    while IFS= read -r line; do
+      echo "$line" >> "$jPath"
+    done < "$header"
+    
+    printf "%s\n" "*/" >> "$jPath" 
+    echo " " >> "$jPath"
+  else
+    echo "Cannot add license header in $jPath"
+    echo "Please ensure jshell-init.jsh exists"
+    exit 1
+  fi

Review comment:
       @ctubbsii Thank you for reviewing my code submission. I'll make the proposed updates and test out the code before pushing a revised copy later.




----------------------------------------------------------------
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.

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