File: qmic_wrapper.sh

package info (click to toggle)
81voltd 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: ansic: 1,510; sh: 4; makefile: 3
file content (26 lines) | stat: -rwxr-xr-x 601 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
#
# QMI interface compiler wrapper from sensh
#
# Copyright (C) 2023 Richard Acayan
#

qmic="$1"

#
# Usage: qmic_wrapper.sh QMIC INPUT OUTPUT_DIRECTORY
#
# Example: qmic_wrapper.sh /usr/bin/qmic ../qmi/sns_client.qmi qmi/
#

#
# We need to move into the output directory so QMIC puts the files in the
# correct place, but the path to the input might be relative to the directory
# we are already in. Open the file now and pipe it to stdin so the pathname
# gets processed relative to the correct directory.
#
exec < "$2"

cd "$3"
exec "$qmic" -k