libgphoto2: shell portability

This commit is contained in:
tnn 2020-08-18 00:30:13 +00:00
parent 7a38ac6c9b
commit 95f9293094
2 changed files with 24 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.29 2018/01/31 10:53:40 jperkin Exp $
$NetBSD: distinfo,v 1.30 2020/08/18 00:30:13 tnn Exp $
SHA1 (libgphoto2-2.5.8.tar.bz2) = 976feb07d51026e6ca647f9fa333c500c5e0c041
RMD160 (libgphoto2-2.5.8.tar.bz2) = bbb57fdace9783f9829bafbd89818949f6d0fce3
@ -18,3 +18,4 @@ SHA1 (patch-camlibs_panasonic_coolshot_library.c) = bb476c660d8ef011f11da119a718
SHA1 (patch-camlibs_st2205_st2205.c) = 2269a9d6d143bd74c49e21fafb706c6ee528748e
SHA1 (patch-libgphoto2__port_gphoto2_gphoto2-port-portability.h) = 9f62a7c4213f8be273b6da7b2cbbd1f68e697631
SHA1 (patch-libgphoto2_gphoto2-file.c) = 2b63f2e3bb3b6ef73c8d860efdda5e342f093eb8
SHA1 (patch-packaging_generic_check-ptp-camera) = d828f1e36f2d86c6b3cfc68969efddd3fea0784d

View file

@ -0,0 +1,22 @@
$NetBSD: patch-packaging_generic_check-ptp-camera,v 1.1 2020/08/18 00:30:13 tnn Exp $
double brackets
--- packaging/generic/check-ptp-camera.orig 2020-08-18 00:27:22.303662350 +0000
+++ packaging/generic/check-ptp-camera
@@ -20,13 +20,13 @@ INTERFACE="${1:-06/01/01}"
BASENAME=${DEVPATH##*/}
for d in /sys/${DEVPATH}/${BASENAME}:*; do
- [[ -d ${d} ]] || continue
+ [ -d ${d} ] || continue
INTERFACEID="$(< ${d}/bInterfaceClass)"
INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceSubClass)"
INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceProtocol)"
#echo ${d}: ${INTERFACEID}
- if [[ ${INTERFACE} == ${INTERFACEID} ]]; then
+ if [ ${INTERFACE} = ${INTERFACEID} ]; then
# Found interface
exit 0
fi