Skip to content

Commit 4d4b913

Browse files
authored
Update flattool
Speedup orphans command by making it store the flatpak list as a variable instead of running that multiple times.
1 parent 1c27880 commit 4d4b913

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flattool

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,11 @@ purgeApp() {
254254

255255
fixOrphans() {
256256
echo "Checking '~/.var/app' for orphaned folders..."
257+
appsList="$(flatpak list)"
257258
orphanedAppsList=()
258259
for element in "$HOME/.var/app/"*; do
259260
element=$(basename "$element")
260-
foundApp=$(flatpak list | grep -i "$element")
261+
foundApp=$(grep -i "$element" <<< "$appsList")
261262
if [ -z "$foundApp" ]; then
262263
orphanedAppsList+=( "$element" )
263264
fi

0 commit comments

Comments
 (0)