Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions debian/update-dch-from-git
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ source scripts/githelper.sh
githelper "$1"

GIT_VERSION=$(scripts/get-version-from-git "$GIT_BRANCH")
# Need to use $? because we need the output capture
# shellcheck disable=SC2181
if [ $? -ne 0 ]; then
echo "error determining version!"
exit 1
Expand Down
15 changes: 12 additions & 3 deletions docs/src/asciideps
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
#!/bin/sh
#!/bin/bash

set -e

test -z "$1" && exit 0
test -f "$1" || exit 1

includestack=( )

includes () {
DIR=$(dirname "$1")

for f in $(sed -ne "s|^include::\(.*\)\[\]$|$DIR/\1|p" "$1"); do
while IFS= read -r f; do
# components_gen.adoc will contain only generated content
case "$f" in
*/components_gen.adoc)
touch "$f"
;;
esac
echo "$f"
ff=$(realpath "$f")
if [[ " ${includestack[*]} " =~ [[:space:]]${ff}[[:space:]] ]]; then
Comment thread
grandixximo marked this conversation as resolved.
echo "Include file recursion detected on '$f'. Skipped." >&2
continue
fi
includestack+=("$ff")
includes "$f"
done
unset 'includestack[${#includestack[@]}-1]'
done < <(sed -ne "s|^include::\(.*\)\[\]$|$DIR/\1|p" "$1")
}

images() {
Expand Down
11 changes: 8 additions & 3 deletions scripts/linuxcnc_info.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function parse_after_colon () {

function tryversion () {
prog="$1"
if [ $(command -v "$prog") ] ; then
if [ "$(command -v "$prog")" ] ; then
ans=$($prog --version 2>/dev/null)
if [ -z "$ans" ] ; then
echo "?"
Expand Down Expand Up @@ -165,9 +165,14 @@ for n in $(linuxcnc_var all) ; do
show "${n%%=*}" "${n##*=}"
done

# Not everybody runs Debian based distros
echo
echo "dpkg -l '*linuxcnc*':"
dpkg -l '*linuxcnc*'
if command -v dpkg > /dev/null; then
echo "dpkg -l '*linuxcnc*':"
dpkg -l '*linuxcnc*'
else
echo "No 'dpkg' available, different distro, probably."
fi
echo

[ -n "$VIEWER" ] && $VIEWER "$ofile"
Expand Down
4 changes: 2 additions & 2 deletions scripts/rip-environment.in
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ if ! $as_command; then
else
_iningc () {
case "$3" in
*.ini) COMPREPLY=($(compgen -o plusdirs -f -X '!*.ngc' -- "$2")) ;;
*) COMPREPLY=($(compgen -o plusdirs -f -X '!*.ini' -- "$2"))
*.ini) mapfile -t COMPREPLY < <(compgen -o plusdirs -f -X '!*.ngc' -- "$2") ;;
*) mapfile -t COMPREPLY < <(compgen -o plusdirs -f -X '!*.ini' -- "$2")
esac
}
complete -o plusdirs -F _iningc emc axis
Expand Down
Loading