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
|
#!/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
|
# Set default values if not provided
|
||||||
printf "Error:\n$errors" >&2
|
if [ -z "$aeropkg_home" ]; then
|
||||||
exit 1
|
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
|
fi
|
||||||
|
|
||||||
INSTALL_PATH="$aeropkg_home"
|
INSTALL_PATH="$aeropkg_home"
|
||||||
BASE_PATH="$aeropkg_base"
|
BASE_PATH="$aeropkg_base"
|
||||||
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
|
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
|
||||||
|
|
||||||
|
|
||||||
cargo build --release
|
cargo build --release
|
||||||
mkdir -p "$SCRIPT_DIR/target/release/bin"
|
mkdir -p "$SCRIPT_DIR/target/release/bin"
|
||||||
cp -f "$SCRIPT_DIR/target/release/pkg" "$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
|
if [ -f "$BIN_PATH" ]; then
|
||||||
patchelf --set-interpreter /pkg/gnu/glibc/lib/ld-linux-x86-64.so.2 "$BIN_PATH"
|
patchelf --set-interpreter /pkg/gnu/glibc/lib/ld-linux-x86-64.so.2 "$BIN_PATH"
|
||||||
if [ $? -ne 0 ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Error: Executable '$BIN_PATH' not found after installation."
|
echo "Error: Executable '$BIN_PATH' not found after installation." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user