mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
Standardize and auto add license headers for Shell files with pre-commit (#12070)
* Add shebang to shell scripts
This commit is contained in:
parent
aa18188d30
commit
39126a4339
@ -62,6 +62,16 @@ repos:
|
|||||||
- .github/workflows/license-templates/LICENSE.txt
|
- .github/workflows/license-templates/LICENSE.txt
|
||||||
- --fuzzy-match-generates-todo
|
- --fuzzy-match-generates-todo
|
||||||
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$
|
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$
|
||||||
|
- id: insert-license
|
||||||
|
name: add license for all Shell files
|
||||||
|
description: automatically adds a licence header to all Shell files that don't have a license header
|
||||||
|
files: \.sh$
|
||||||
|
args:
|
||||||
|
- --comment-style
|
||||||
|
- '|#|'
|
||||||
|
- --license-filepath
|
||||||
|
- .github/workflows/license-templates/LICENSE.txt
|
||||||
|
- --fuzzy-match-generates-todo
|
||||||
- id: insert-license
|
- id: insert-license
|
||||||
name: add license for all SQL files
|
name: add license for all SQL files
|
||||||
files: \.sql$
|
files: \.sql$
|
||||||
|
|||||||
@ -1,20 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
# or more contributor license agreements. See the NOTICE file
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# distributed with this work for additional information
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# regarding copyright ownership. The ASF licenses this file
|
# distributed with this work for additional information
|
||||||
# to you under the Apache License, Version 2.0 (the
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# "License"); you may not use this file except in compliance
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# with the License. You may obtain a copy of the License at
|
# "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
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing,
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# software distributed under the License is distributed on an
|
# software distributed under the License is distributed on an
|
||||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
# KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
export EnableNuGetPackageRestore=true
|
export EnableNuGetPackageRestore=true
|
||||||
wget http://nuget.org/nuget.exe
|
wget http://nuget.org/nuget.exe
|
||||||
mv nuget.exe ./DotNet/ServerResource/.nuget/NuGet.exe
|
mv nuget.exe ./DotNet/ServerResource/.nuget/NuGet.exe
|
||||||
|
|||||||
@ -1,19 +1,21 @@
|
|||||||
#Licensed to the Apache Software Foundation (ASF) under one
|
#!/bin/bash
|
||||||
#or more contributor license agreements. See the NOTICE file
|
|
||||||
#distributed with this work for additional information
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
#regarding copyright ownership. The ASF licenses this file
|
# or more contributor license agreements. See the NOTICE file
|
||||||
#to you under the Apache License, Version 2.0 (the
|
# distributed with this work for additional information
|
||||||
#"License"); you may not use this file except in compliance
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
#with the License. You may obtain a copy of the License at
|
# 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
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
#Unless required by applicable law or agreed to in writing,
|
# Unless required by applicable law or agreed to in writing,
|
||||||
#software distributed under the License is distributed on an
|
# software distributed under the License is distributed on an
|
||||||
#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
#KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
#specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
#under the License.
|
# under the License.
|
||||||
|
|
||||||
CERT="/etc/ovs-agent/cert"
|
CERT="/etc/ovs-agent/cert"
|
||||||
socat OPENSSL-LISTEN:8899,reuseaddr,fork,verify=0,key=$CERT/key.pem,cert=$CERT/certificate.pem TCP:localhost:8898 &
|
socat OPENSSL-LISTEN:8899,reuseaddr,fork,verify=0,key=$CERT/key.pem,cert=$CERT/certificate.pem TCP:localhost:8898 &
|
||||||
|
|||||||
@ -1,19 +1,21 @@
|
|||||||
#Licensed to the Apache Software Foundation (ASF) under one
|
#!/bin/bash
|
||||||
#or more contributor license agreements. See the NOTICE file
|
|
||||||
#distributed with this work for additional information
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
#regarding copyright ownership. The ASF licenses this file
|
# or more contributor license agreements. See the NOTICE file
|
||||||
#to you under the Apache License, Version 2.0 (the
|
# distributed with this work for additional information
|
||||||
#"License"); you may not use this file except in compliance
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
#with the License. You may obtain a copy of the License at
|
# 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
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
#Unless required by applicable law or agreed to in writing,
|
# Unless required by applicable law or agreed to in writing,
|
||||||
#software distributed under the License is distributed on an
|
# software distributed under the License is distributed on an
|
||||||
#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
#KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
#specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
#under the License.
|
# under the License.
|
||||||
|
|
||||||
cd /var/log
|
cd /var/log
|
||||||
tail -f ovm-consoled.log devmon.log messages ovs-agent.log ovmwatch.log
|
tail -f ovm-consoled.log devmon.log messages ovs-agent.log ovmwatch.log
|
||||||
|
|||||||
@ -1,20 +1,21 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
## Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
## or more contributor license agreements. See the NOTICE file
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
## distributed with this work for additional information
|
# or more contributor license agreements. See the NOTICE file
|
||||||
## regarding copyright ownership. The ASF licenses this file
|
# distributed with this work for additional information
|
||||||
## to you under the Apache License, Version 2.0 (the
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
## "License"); you may not use this file except in compliance
|
# to you under the Apache License, Version 2.0 (the
|
||||||
## with the License. You may obtain a copy of the License at
|
# "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
|
#
|
||||||
##
|
# 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
|
# Unless required by applicable law or agreed to in writing,
|
||||||
## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
# software distributed under the License is distributed on an
|
||||||
## KIND, either express or implied. See the License for the
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
## specific language governing permissions and limitations
|
# KIND, either express or implied. See the License for the
|
||||||
## under the License.
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
|
|||||||
@ -1,20 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
## or more contributor license agreements. See the NOTICE file
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
## distributed with this work for additional information
|
# or more contributor license agreements. See the NOTICE file
|
||||||
## regarding copyright ownership. The ASF licenses this file
|
# distributed with this work for additional information
|
||||||
## to you under the Apache License, Version 2.0 (the
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
## "License"); you may not use this file except in compliance
|
# to you under the Apache License, Version 2.0 (the
|
||||||
## with the License. You may obtain a copy of the License at
|
# "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
|
#
|
||||||
##
|
# 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
|
# Unless required by applicable law or agreed to in writing,
|
||||||
## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
# software distributed under the License is distributed on an
|
||||||
## KIND, either express or implied. See the License for the
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
## specific language governing permissions and limitations
|
# KIND, either express or implied. See the License for the
|
||||||
## under the License.
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
version=0.9.1
|
version=0.9.1
|
||||||
OPTIND=1
|
OPTIND=1
|
||||||
|
|||||||
@ -1,20 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
## or more contributor license agreements. See the NOTICE file
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
## distributed with this work for additional information
|
# or more contributor license agreements. See the NOTICE file
|
||||||
## regarding copyright ownership. The ASF licenses this file
|
# distributed with this work for additional information
|
||||||
## to you under the Apache License, Version 2.0 (the
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
## "License"); you may not use this file except in compliance
|
# to you under the Apache License, Version 2.0 (the
|
||||||
## with the License. You may obtain a copy of the License at
|
# "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
|
#
|
||||||
##
|
# 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
|
# Unless required by applicable law or agreed to in writing,
|
||||||
## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
# software distributed under the License is distributed on an
|
||||||
## KIND, either express or implied. See the License for the
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
## specific language governing permissions and limitations
|
# KIND, either express or implied. See the License for the
|
||||||
## under the License.
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
version=0.9.1
|
version=0.9.1
|
||||||
OPTIND=1
|
OPTIND=1
|
||||||
|
|||||||
@ -1,21 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#Licensed to the Apache Software Foundation (ASF) under one
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
#or more contributor license agreements. See the NOTICE file
|
# or more contributor license agreements. See the NOTICE file
|
||||||
#distributed with this work for additional information
|
# distributed with this work for additional information
|
||||||
#regarding copyright ownership. The ASF licenses this file
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
#to you under the Apache License, Version 2.0 (the
|
# to you under the Apache License, Version 2.0 (the
|
||||||
#"License"); you may not use this file except in compliance
|
# "License"); you may not use this file except in compliance
|
||||||
#with the License. You may obtain a copy of the License at
|
# with the License. You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
#Unless required by applicable law or agreed to in writing,
|
# Unless required by applicable law or agreed to in writing,
|
||||||
#software distributed under the License is distributed on an
|
# software distributed under the License is distributed on an
|
||||||
#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
#KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
#specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
#under the License.
|
# under the License.
|
||||||
|
|
||||||
set +u
|
set +u
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# or more contributor license agreements. See the NOTICE file
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# distributed with this work for additional information
|
# distributed with this work for additional information
|
||||||
@ -10,6 +11,7 @@
|
|||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing,
|
# 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
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
# KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# or more contributor license agreements. See the NOTICE file
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# distributed with this work for additional information
|
# distributed with this work for additional information
|
||||||
# # regarding copyright ownership. The ASF licenses this file
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
# to you under the Apache License, Version 2.0 (the
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# "License"); you may not use this file except in compliance
|
# "License"); you may not use this file except in compliance
|
||||||
# with the License. You may obtain a copy of the License at
|
# with the License. You may obtain a copy of the License at
|
||||||
@ -16,7 +16,6 @@
|
|||||||
# KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
#
|
|
||||||
|
|
||||||
set +u
|
set +u
|
||||||
|
|
||||||
|
|||||||
@ -1,23 +1,23 @@
|
|||||||
#!/bin/bash
|
#!/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.
|
||||||
|
|
||||||
# Usage ./reset-network.sh interface ip netmask
|
# Usage ./reset-network.sh interface ip netmask
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
|
|
||||||
[ $# -lt 3 ] && { echo -e "Missing arguments\nUsage: ./reset-network interface ip netmask label"; exit 1; }
|
[ $# -lt 3 ] && { echo -e "Missing arguments\nUsage: ./reset-network interface ip netmask label"; exit 1; }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user