szetszwo commented on a change in pull request #612: URL: https://github.com/apache/ratis/pull/612#discussion_r816423698
########## File path: dev-support/intellij/install-runconfig.sh ########## @@ -0,0 +1,22 @@ +#!/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. + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +SRC_DIR="$SCRIPT_DIR/runConfigurations" +DEST_DIR="$SCRIPT_DIR/../../.idea/runConfigurations/" +mkdir -p "$DEST_DIR" +ls -1 "$SRC_DIR" | xargs -n1 -I FILE cp "$SRC_DIR/FILE" "$DEST_DIR" Review comment: Why not simply `cp -i "${SRC_DIR}"/* "${DEST_DIR}"`? Is there a reason to use ls and then xargs? BTW, it is good to add `-i` so that it will take care if the file exists. ########## File path: dev-support/intellij/runConfigurations/Server1.xml ########## @@ -0,0 +1,29 @@ +<!-- + Licensed 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. See accompanying LICENSE file. +--> +<component name="ProjectRunConfigurationManager"> + <configuration default="false" name="Server1" type="Application" factoryName="Application" nameIsGenerated="true"> + <option name="MAIN_CLASS_NAME" value="org.apache.ratis.examples.debug.server.Server" /> + <module name="ratis-examples" /> + <option name="PROGRAM_PARAMETERS" value="127.0.0.1:10024" /> Review comment: Please see if we can easily generate this conf file from `ratis-examples/src/main/resources/conf.properties`. If it is too complicated, please add a comment such as below. ``` <!-- See ratis-examples/src/main/resources/conf.properties --> ``` ########## File path: dev-support/intellij/runConfigurations/Server1.xml ########## @@ -0,0 +1,29 @@ +<!-- + Licensed 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. See accompanying LICENSE file. +--> +<component name="ProjectRunConfigurationManager"> + <configuration default="false" name="Server1" type="Application" factoryName="Application" nameIsGenerated="true"> Review comment: Let's call it `ExampleServer1`. Please change also the file name. ########## File path: dev-support/intellij/install-runconfig.sh ########## @@ -0,0 +1,22 @@ +#!/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. + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +SRC_DIR="$SCRIPT_DIR/runConfigurations" +DEST_DIR="$SCRIPT_DIR/../../.idea/runConfigurations/" Review comment: Let's print out the dirs and show the mkdir and cp commands. ``` echo src : "${SRC_DIR}" echo dest: "${DEST_DIR}" set -ex ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
