Unverified Commit 3e02494c authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'mjtrangoni-fix-shellcheck-issues' into 3.6.x

parents f696a57f 9d036419
#!/bin/sh
cat $* | awk 'BEGIN { \
awk 'BEGIN { \
printf "/*\n * This file is generated from %s. Do not edit.\n */\n", \
"$(INCLUDESRC)/keysymdef.h";\
} \
/^#define/ { \
len = length($2)-3; \
printf("{ \"%s\", %s },\n", substr($2,4,len), $3); \
}'
}' "$@"
#!/bin/sh
where=`dirname $0`
where=$(dirname $0)
git ls-files | grep '\.[chm]$' | xargs sh "$where"/x-indent.sh
......@@ -2,7 +2,7 @@
# We want GNU indent, so first search for gindent to avoid /usr/bin/indent
# on the BSDs, which won't work for us
INDENT=`which gnuindent || which gindent || which indent`
INDENT=$(which gnuindent || which gindent || which indent)
if [ -z "${INDENT}" ] ; then
echo "Could not find indent, sorry..." >&2
......
......@@ -24,11 +24,11 @@ SYMBOLS_FILE="doc/libNX_X11/symbols/libNX_X11::symbols.txt"
DOC_FILE="doc/libNX_X11/symbols/libNX_X11::symbol-usage_internally.txt"
echo "Scanning for libNX_X11 symbols: in libNX_X11 internally: $DOC_FILE"
cd nx-X11/lib/X11/
cat "../../../$SYMBOLS_FILE" | grep -v -E "^#" | while read symbol; do
grep -v -E "^#" "../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
echo "#### $symbol ####"
grep -n $symbol *.{c,h} 2>/dev/null
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../$DOC_FILE"
cd - 1>/dev/null
......@@ -36,11 +36,11 @@ cd - 1>/dev/null
DOC_FILE="doc/libNX_X11/symbols/libNX_X11::symbol-usage_nxagent.txt"
echo "Scanning for libNX_X11 symbols: in hw/nxagent: $DOC_FILE"
cd nx-X11/programs/Xserver/hw/nxagent/
cat "../../../../../$SYMBOLS_FILE" | grep -v -E "^#" | while read symbol; do
grep -v -E "^#" "../../../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
echo "#### $symbol ####"
grep -n $symbol *.{c,h} 2>/dev/null
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../../../$DOC_FILE"
cd - 1>/dev/null
......@@ -48,11 +48,11 @@ cd - 1>/dev/null
DOC_FILE="doc/libNX_X11/symbols/libNX_X11::symbol-usage_nxcompext.txt"
echo "Scanning for libNX_X11 symbols: in hw/nxagent/compext: $DOC_FILE"
cd nx-X11/programs/Xserver/hw/nxagent/compext/
cat "../../../../../../$SYMBOLS_FILE" | grep -v -E "^#" | while read symbol; do
grep -v -E "^#" "../../../../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
echo "#### $symbol ####"
grep -n $symbol *.{c,h} 2>/dev/null
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../../../../$DOC_FILE"
cd - 1>/dev/null
......@@ -65,11 +65,11 @@ SYMBOLS_FILE="doc/nxcompext/symbols/nxcompext::symbols.txt"
DOC_FILE="doc/nxcompext/symbols/nxcompext::symbol-usage_internally.txt"
echo "Scanning for nxcompext symbols: in hw/nxagent/compext internally: $DOC_FILE"
cd nx-X11/programs/Xserver/hw/nxagent/compext/
cat "../../../../../../$SYMBOLS_FILE" | grep -v -E "^#" | while read symbol; do
grep -v -E "^#" "../../../../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
echo "#### $symbol ####"
grep -n $symbol *.{c,h} 2>/dev/null
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../../../../$DOC_FILE"
cd - 1>/dev/null
......@@ -77,11 +77,11 @@ cd - 1>/dev/null
DOC_FILE="doc/nxcompext/symbols/nxcompext::symbol-usage_nxagent.txt"
echo "Scanning for nxcompext symbols: in hw/nxagent: $DOC_FILE"
cd nx-X11/programs/Xserver/hw/nxagent/
cat ../../../../../$SYMBOLS_FILE | grep -v -E "^#" | while read symbol; do
grep -v -E "^#" "../../../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
echo "#### $symbol ####"
grep -n $symbol *.{c,h} 2>/dev/null
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../../../$DOC_FILE"
cd - 1>/dev/null
#!/bin/bash
# Copyright (C) 2013 Jan Engelhardt <jengelh@inai.de>
#
# This program is free software; you can redistribute it and/or modify
......
......@@ -31,7 +31,6 @@ usage() {
}
PROJECT="nx-libs"
NULL=""
test -d ".git" || usage
RELEASE="$1"
......@@ -59,7 +58,7 @@ fi
if ! git rev-parse --verify -q "$CHECKOUT" >/dev/null; then
echo " '${RELEASE}' is not a valid release number because there is no git tag named ${CHECKOUT}."
echo " Please specify one of the following releases:"
echo "HEAD (on branch `git rev-parse --abbrev-ref HEAD`)"
echo "HEAD (on branch $(git rev-parse --abbrev-ref HEAD))"
git tag -l | grep "^redist" | cut -f2 -d"/" | sort -u
exit 1
fi
......@@ -81,7 +80,7 @@ cd "${TEMP_DIR}/${PROJECT}-${RELEASE}/"
# Replace symlinks by copies of the linked target files
# Note: We don't have symlinked directories!!!
find . -type "l" | while read link; do
find . -type "l" | while read -r link; do
TARGET="$(readlink "${link}")"
pushd "$(dirname "${link}")" >/dev/null
if [ -f "${TARGET}" ]; then
......@@ -156,12 +155,12 @@ if [ "x$MODE" = "xfull" ]; then
rm -f "nx-X11/extras/Mesa/src/mesa/main/"*.py
rm -f "nx-X11/extras/Mesa/src/mesa/main/"{mesa.def,Imakefile,vsnprintf.c}
find nx-X11/extras/Mesa/ -name Makefile | while read file; do rm "$file"; done
find nx-X11/extras/Mesa/ -name Makefile.* | while read file; do rm "$file"; done
find nx-X11/extras/Mesa/ -name descrip.mms | while read file; do rm "$file"; done
find nx-X11/extras/Mesa/ -name Makefile | while read -r file; do rm "$file"; done
find nx-X11/extras/Mesa/ -name 'Makefile.*' | while read -r file; do rm "$file"; done
find nx-X11/extras/Mesa/ -name descrip.mms | while read -r file; do rm "$file"; done
# this is for 3.5.0.x only...
cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.(full|full\+lite)\.patch)" | while read file
sort "debian/patches/series" | grep -v '^#' | grep -E "([0-9]+(_|-).*\.(full|full\+lite)\.patch)" | while read -r file
do
cp -v "debian/patches/$file" "doc/applied-patches/"
echo "${file##*/}" >> "doc/applied-patches/series"
......@@ -198,7 +197,7 @@ else
mv LICENSE.nxcomp LICENSE
# this is for 3.5.0.x only...
cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.full\+lite\.patch)" | while read file
sort "debian/patches/series" | grep -v '^#' | grep -E "([0-9]+(_|-).*\.full\+lite\.patch)" | while read -r file
do
cp -v "debian/patches/$file" "doc/applied-patches/"
echo "${file##*/}" >> "doc/applied-patches/series"
......@@ -217,8 +216,9 @@ rm -Rf "debian/"
rm -Rf "nx-libs.spec"
# very old release did not add any README
for f in $(ls README* 2>/dev/null); do
mv -v "$f" "doc/";
for f in README*; do
[[ -e "$f" ]] || break # handle the case of no README* files
mv -v "$f" "doc/"
done
# remove files, that we do not want in the tarballs (build cruft)
......
......@@ -31,4 +31,4 @@ VER="$(head -n "1" "${VERSION_FILE}" | cut -d"." -f"${COMPONENT}")"
[ "x${VER}" = "x" ] && VER="0"
printf "${VER}"
printf "%s" "${VER}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment