Debian Codegraph @

debian/rust-vendor/aws-lc-sys/builder/prebuilt-nasm.sh

raw
1 #!/usr/bin/env bash
2 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 # SPDX-License-Identifier: Apache-2.0 OR ISC
4
5 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6
7 while [[ $# -gt 0 ]]; do
8 case "$1" in
9 -o)
10 shift
11 path="$1"
12 filename="$(basename "$path")"
13 filename="$(echo "$filename" | cut -f 1 -d '.')"
14 cp "$SCRIPT_DIR/prebuilt-nasm/${filename}".obj "$path"
15 exit 0
16 ;;
17 *)
18 shift
19 ;;
20 esac
21 done
22
23 # If we reach here, it means we didn't find the -o option
24 echo "PATH: $path" >&2
25 echo "FILENAME: $filename" >&2
26 echo "SCRIPT_DIR: $SCRIPT_DIR" >&2
27 exit 1