mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
gen_sdk_package_*.sh: Accept relative Xcode paths (closes #189)
This commit is contained in:
parent
16efae8992
commit
37894c5839
@ -22,6 +22,8 @@ if [ $# -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
XCODEDMG=$(make_absolute_path $1 $(get_exec_dir))
|
||||
|
||||
mkdir -p $BUILD_DIR
|
||||
|
||||
require modinfo
|
||||
@ -75,6 +77,6 @@ function cleanup()
|
||||
trap cleanup EXIT
|
||||
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR_SDK_TOOLS/lib \
|
||||
$TARGET_DIR/SDK/tools/bin/darling-dmg $1 $TMP
|
||||
$TARGET_DIR/SDK/tools/bin/darling-dmg $XCODEDMG $TMP
|
||||
|
||||
XCODEDIR=$TMP ./tools/gen_sdk_package.sh
|
||||
|
@ -21,10 +21,7 @@ if [ $# -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
/*) XCODEDMG="$1" ;;
|
||||
*) XCODEDMG="$PWD/$1" ;;
|
||||
esac
|
||||
XCODEDMG=$(make_absolute_path $1 $(get_exec_dir))
|
||||
|
||||
mkdir -p $BUILD_DIR
|
||||
|
||||
|
@ -15,6 +15,8 @@ if [ $# -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
XCODE=$(make_absolute_path $1 $(get_exec_dir))
|
||||
|
||||
mkdir -p $BUILD_DIR
|
||||
pushd $BUILD_DIR &>/dev/null
|
||||
|
||||
@ -36,10 +38,10 @@ create_tmp_dir
|
||||
|
||||
pushd $TMP_DIR &>/dev/null
|
||||
|
||||
echo "Extracting $1 (this may take several minutes) ..."
|
||||
echo "Extracting $XCODE (this may take several minutes) ..."
|
||||
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib \
|
||||
verbose_cmd "$TARGET_DIR/bin/xar -xf $1 -C $TMP_DIR"
|
||||
verbose_cmd "$TARGET_DIR/bin/xar -xf $XCODE -C $TMP_DIR"
|
||||
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib \
|
||||
verbose_cmd "$TARGET_DIR/SDK/tools/bin/pbzx -n Content | cpio -i"
|
||||
|
@ -189,6 +189,28 @@ function extract()
|
||||
}
|
||||
|
||||
|
||||
function get_exec_dir()
|
||||
{
|
||||
local dirs=$(dirs)
|
||||
echo ${dirs##* }
|
||||
}
|
||||
|
||||
function make_absolute_path()
|
||||
{
|
||||
local current_path
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
current_path=$PWD
|
||||
else
|
||||
current_path=$2
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
/*) echo "$1" ;;
|
||||
*) echo "${current_path}/$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
function cleanup_tmp_dir()
|
||||
{
|
||||
if [ -n "$OC_KEEP_TMP_DIR" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user