diff --git a/azule b/azule index 30df597..876a1a4 100755 --- a/azule +++ b/azule @@ -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 () { @@ -266,8 +267,8 @@ help () { echo echo " -h Print this help menu" echo - exit 1 - + exit_code=0 + exit } # CLEAN ON EXIT @@ -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 @@ -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/*')