Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Alaise committed Aug 17, 2021
1 parent 9a26d3b commit fe414a3
Showing 1 changed file with 25 additions and 29 deletions.
54 changes: 25 additions & 29 deletions azule
Original file line number Diff line number Diff line change
Expand Up @@ -722,15 +722,38 @@ fi
# PROCESSING FILES
if [ -n "$temp_files" ]; then

# INITIALIZING ${FILES}
for i in "${!temp_files[@]}"; do
x="$i"
unset indexes[@]
while [[ "$x" -lt "${#temp_files[@]}" ]]; do
indexes+=( "$x" )
string+=" ${temp_files[x]}"
if [ -e "$(expand "$string")" ] && [[ -z "${temp_files[x+1]}" || ! -e "$(expand "$string ${temp_files[x+1]}")" ]]; then
files+=( "$(expand "$string")" )

# VERBOSE
if [ -n "$v" ]; then
echo "$(expand "$string") will be imported"
fi

case "$(expand "$string")" in
*.deb) ExtractDEB "$i" ;;

*.dylib)
rsync -a "$i" "$dir/$tweakid/Tweak"
Verbose "Copied $(basename "$i") to work directory" "Couldn't Copy $(basename "$i") to work directory" -v
;;

*.framework)
rsync -a "$i" "$dir/$tweakid/Tweak"
Verbose "Moved $(basename "$i") to work directory" "Couldn't Move $(basename "$i") to work directory" -v
;;

*)
rsync -a "$i" Payload/*.app
Verbose "Moved $(basename "$i") to app directory" "Couldn't Move $(basename "$i") to app directory"
;;
esac

for g in "${indexes[@]}"; do
unset temp_files[g]
done
Expand All @@ -740,34 +763,7 @@ if [ -n "$temp_files" ]; then
done
unset string
done

# VERBOSE
if [[ -n "$v" && -n "$files" ]]; then
for i in "${files[@]}"; do
echo "$i will be imported"
done
fi

for i in "${files[@]}"; do
case "$i" in
*.deb) ExtractDEB "$i" ;;

*.dylib)
rsync -a "$i" "$dir/$tweakid/Tweak"
Verbose "Copied $(basename "$i") to work directory" "Couldn't Copy $(basename "$i") to work directory" -v
;;

*.framework)
rsync -a "$i" "$dir/$tweakid/Tweak"
Verbose "Moved $(basename "$i") to work directory" "Couldn't Move $(basename "$i") to work directory" -v
;;

*)
rsync -a "$i" Payload/*.app
Verbose "Moved $(basename "$i") to app directory" "Couldn't Move $(basename "$i") to app directory"
;;
esac
done

for i in "${temp_files[@]}"; do

Expand Down

0 comments on commit fe414a3

Please sign in to comment.