Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Al4ise committed Nov 28, 2021
1 parent 0c76f71 commit da913ac
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions azule
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ cleanup () {
cd "$rootdir" || exit
if [ -n "$ignore_errors" ]; then
exit_code=0
else
exit "$exit_code"
fi
exit "$exit_code"
}

help () {
Expand Down Expand Up @@ -266,8 +267,8 @@ help () {
echo
echo " -h Print this help menu"
echo
exit 1

exit_code=0
exit
}

# CLEAN ON EXIT
Expand Down Expand Up @@ -725,9 +726,13 @@ appname="$(basename Payload/*.app)"
# GETTING APP EXECUTABLE
executable="Payload/$appname/$(ExtractPlistValue CFBundleExecutable Payload/"$appname"/Info.plist)"
Verbose "App executable is $executable" "Couldn't set app executable" 12 -v -e
rpath="$(expand "$(otool -l "$executable" | grep RPATH -A2 | tail -1 | sed 's/.*path \(.*\)/\1/' | grep -o '^\S*' | sed "s|@executable_path|Payload/$appname|g"
rpath="$(expand "$(otool -l "$executable" | grep RPATH -A2 | sed 's/.*path \(.*\)/\1/' | grep -o '^\S*' | grep "@executable_path*" | tail -1 | sed "s|@executable_path|Payload/$appname|g"
)")"
Verbose "App rpath is $executable" "Couldn't set app rpath" 13 -v -e
Verbose "App rpath is $rpath" "Couldn't set app rpath" 13 -v -e

if ! [ -d "$rpath" ]; then
mkdir -p "$rpath"
fi

# ENCRYPTION CHECK
if [ -z "$ignore_encrypted" ]; then
Expand Down Expand Up @@ -909,7 +914,7 @@ if [ -n "$files" ]; then

# MOVING BUNDLES
while read -r i; do
rsync -a "$i" Payload/"$appname"/
rsync -a "$i" "$rpath"
Verbose "Copied $(basename "$i") to app directory" "$(basename "$i") couldn't be copied to app directory" 16 -e
done < <(find "$dir/$tweakid/Tweak" ! -type l -iname '*.bundle' ! -path '*PreferenceBundles/*' ! -path '*.bundle/*' ! -path '*.framework/*')

Expand Down

0 comments on commit da913ac

Please sign in to comment.