upd install.sh script
This commit is contained in:
3
assets/var/gnu/wpa_supplicant.md
Normal file
3
assets/var/gnu/wpa_supplicant.md
Normal file
@ -0,0 +1,3 @@
|
||||
wpa_supplicant 2.12
|
||||
=
|
||||
https://git.w1.fi/hostap.git
|
||||
20
install.sh
20
install.sh
@ -1,18 +1,20 @@
|
||||
#!/bin/sh
|
||||
errors=""
|
||||
[ -z "$aeropkg_home" ] && errors="${errors}aeropkg_home must be set to build\n"
|
||||
[ -z "$aeropkg_base" ] && errors="${errors}aeropkg_base must be set to build\n"
|
||||
|
||||
if [ -n "$errors" ]; then
|
||||
printf "Error:\n$errors" >&2
|
||||
exit 1
|
||||
# Set default values if not provided
|
||||
if [ -z "$aeropkg_home" ]; then
|
||||
export aeropkg_home="/pkg/gnu/aeropkg"
|
||||
echo "Warning: aeropkg_home not set. Using default: $aeropkg_home"
|
||||
fi
|
||||
|
||||
if [ -z "$aeropkg_base" ]; then
|
||||
export aeropkg_base="/pkg"
|
||||
echo "Warning: aeropkg_base not set. Using default: $aeropkg_base"
|
||||
fi
|
||||
|
||||
INSTALL_PATH="$aeropkg_home"
|
||||
BASE_PATH="$aeropkg_base"
|
||||
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
|
||||
cargo build --release
|
||||
mkdir -p "$SCRIPT_DIR/target/release/bin"
|
||||
cp -f "$SCRIPT_DIR/target/release/pkg" "$SCRIPT_DIR/target/release/bin"
|
||||
@ -24,11 +26,11 @@ BIN_PATH="$INSTALL_PATH/bin/pkg"
|
||||
if [ -f "$BIN_PATH" ]; then
|
||||
patchelf --set-interpreter /pkg/gnu/glibc/lib/ld-linux-x86-64.so.2 "$BIN_PATH"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to apply patchelf to '$BIN_PATH'."
|
||||
echo "Error: Failed to apply patchelf to '$BIN_PATH'." >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Error: Executable '$BIN_PATH' not found after installation."
|
||||
echo "Error: Executable '$BIN_PATH' not found after installation." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user