Skip to content

Commit 845a471

Browse files
committed
pkg: fix content
1 parent 1f58c58 commit 845a471

File tree

1 file changed

+4
-2
lines changed
  • packages/termux-tools

1 file changed

+4
-2
lines changed

packages/termux-tools/pkg

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ fi
77

88
show_help() {
99
local cache_size
10+
local cache_dir
1011
if [ "$TERMUX_MAIN_PACKAGE_FORMAT" = "debian" ]; then
11-
cache_size=$(du -sh @TERMUX_CACHE_DIR@/apt/archives 2>/dev/null | cut -f1)
12+
cache_dir="@TERMUX_CACHE_DIR@/apt/archives"
1213
elif [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ]; then
13-
cache_size=$(du -sh @TERMUX_PREFIX@/var/cache/pacman/pkg 2>/dev/null | cut -f1)
14+
cache_dir="@TERMUX_PREFIX@/var/cache/pacman/pkg"
1415
fi
16+
cache_size=$(du -sh "$cache_dir" 2>/dev/null | cut -f1)
1517

1618
echo 'Usage: pkg command [arguments]'
1719
echo

0 commit comments

Comments
 (0)