1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

script: Reformat shell scripts

shfmt -f script/ | xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider 2022-02-21 14:02:15 +01:00 committed by Andrew Bartlett
parent 55cd39b92c
commit 22eb76c6d0
8 changed files with 103 additions and 79 deletions

View File

@ -1,8 +1,8 @@
#!/bin/sh
#
N=`git clean -n | wc -l`
C=`git diff --stat HEAD | wc -l`
N=$(git clean -n | wc -l)
C=$(git diff --stat HEAD | wc -l)
test x"$N" != x"0" && {
echo "The tree has $N new uncommitted files!!! see stderr"

View File

@ -11,4 +11,3 @@ for o in $lo; do
done
exit 0

View File

@ -2,8 +2,8 @@
if [ $# -lt 1 ]; then
echo "$0: <installdir>"
exit 1;
exit 1
fi
installdir=$1
exit `find ${installdir} -name \*.py | wc -l`
exit $(find ${installdir} -name \*.py | wc -l)

View File

@ -23,7 +23,8 @@ test -d ".git" -o -r ".git" || {
exit 1
}
usage() {
usage()
{
echo "Usage: script/release.sh <PRODUCT> <COMMAND>"
echo ""
echo "PRODUCT: ldb, talloc, tevent, tdb, samba-rc, samba-stable"
@ -39,7 +40,8 @@ test -x "script/release.sh" || {
exit 1
}
check_args() {
check_args()
{
local cmd="$1"
local got_args="$2"
local take_args="$3"
@ -53,7 +55,8 @@ check_args() {
return 0
}
min_args() {
min_args()
{
local cmd="$1"
local got_args="$2"
local min_args="$3"
@ -78,7 +81,8 @@ patchfile=""
cmds=""
next_cmd=""
require_tagname() {
require_tagname()
{
min_args "${FUNCNAME}" "$#" "1" || return 1
local cmd="$1"
@ -96,7 +100,8 @@ require_tagname() {
return 0
}
cmd_allowed() {
cmd_allowed()
{
min_args "${FUNCNAME}" "$#" "2" || return 1
local cmd="$1"
shift 1
@ -108,7 +113,8 @@ cmd_allowed() {
return 0
}
verify_samba_rc() {
verify_samba_rc()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
test -f VERSION || {
@ -134,7 +140,8 @@ verify_samba_rc() {
return 0
}
load_samba_stable_versions() {
load_samba_stable_versions()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
test -n "${version-}" && {
@ -159,7 +166,8 @@ load_samba_stable_versions() {
return 0
}
verify_samba_stable() {
verify_samba_stable()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
test -f VERSION || {
@ -242,7 +250,8 @@ verify_samba_stable() {
return 0
}
verify_release() {
verify_release()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
test -n "${verify_fn}" || {
@ -254,7 +263,8 @@ verify_release() {
${verify_fn}
}
create_release() {
create_release()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
echo "Releasing product ${product}"
@ -334,7 +344,8 @@ create_release() {
return 0
}
patch_release() {
patch_release()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -380,7 +391,8 @@ patch_release() {
return 0
}
whatsnew_release() {
whatsnew_release()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -391,7 +403,8 @@ whatsnew_release() {
return 0
}
check_nopatch() {
check_nopatch()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -440,7 +453,8 @@ check_nopatch() {
return 0
}
check_samba_stable() {
check_samba_stable()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -518,7 +532,8 @@ check_samba_stable() {
return 0
}
check_release() {
check_release()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
test -n "${check_fn}" || {
@ -530,7 +545,8 @@ check_release() {
${check_fn}
}
push_release() {
push_release()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -542,7 +558,8 @@ push_release() {
return 0
}
upload_nopatch() {
upload_nopatch()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -555,7 +572,8 @@ upload_nopatch() {
return 0
}
upload_samba_stable() {
upload_samba_stable()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -585,7 +603,8 @@ upload_samba_stable() {
return 0
}
upload_release() {
upload_release()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
test -n "${upload_fn}" || {
@ -597,7 +616,8 @@ upload_release() {
${upload_fn}
}
announcement_samba_rc() {
announcement_samba_rc()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -762,7 +782,8 @@ announcement_samba_rc() {
return 0
}
announcement_samba_stable() {
announcement_samba_stable()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -893,8 +914,8 @@ announcement_samba_stable() {
-e 's!Ü!\&Uuml;!g' \
-e 's!ß!\&szlig;!g' \
-e 's!"!\&quot;!g' \
-e "s!'!\&apos;!g" \
| cat
-e "s!'!\&apos;!g" |
cat
echo "</pre>"
echo "</p>"
@ -1002,7 +1023,8 @@ announcement_samba_stable() {
return 0
}
announcement_release() {
announcement_release()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
test -n "${announcement_fn}" || {
@ -1014,7 +1036,8 @@ announcement_release() {
${announcement_fn}
}
announce_release() {
announce_release()
{
check_args "${FUNCNAME}" "$#" "0" || return 1
require_tagname "${FUNCNAME}"
@ -1117,6 +1140,7 @@ TODO-samba-security)
usage
echo "Unknown product ${product}"
exit 1
;;
esac
pushd ${srcdir} || {
@ -1124,7 +1148,8 @@ pushd ${srcdir} || {
exit 1
}
trap_handler() {
trap_handler()
{
echo ""
echo "ERROR: cleaning up"
echo ""