Skip to content

Commit

Permalink
Update compile-tun2socks.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphax-Hue3682 authored Feb 7, 2025
1 parent 24c3ae7 commit ae4e986
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion compile-tun2socks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ __base="$(basename ${__file} .sh)"
# Constants
NDK_HOME_DIR="$NDK_HOME"
APP_PLATFORM_VERSION="android-19"
SOURCE_DIR="/home/runner/work/v2rayNG/v2rayNG/libs"
DEST_DIR="/home/runner/work/v2rayNG/v2rayNG/V2rayNG/app"

# Check if NDK_HOME is set
if [[ -z "$NDK_HOME_DIR" ]]; then
Expand Down Expand Up @@ -83,4 +85,23 @@ echo "Cleaning up temporary directory..."
popd
clear_tmp

echo "Build completed. Libraries are in $__dir"
# Check and create directories
if [ ! -d "$SOURCE_DIR" ]; then
echo "Source directory does not exist. Creating..."
mkdir -p "$SOURCE_DIR"
else
echo "Source directory exists."
fi

if [ ! -d "$DEST_DIR" ]; then
echo "Destination directory does not exist. Creating..."
mkdir -p "$DEST_DIR"
else
echo "Destination directory exists."
fi

# Copy the directory
echo "Copying libraries..."
cp -r "$SOURCE_DIR" "$DEST_DIR"

echo "Build completed. Libraries are in $__dir and copied to $DEST_DIR"

0 comments on commit ae4e986

Please sign in to comment.