Skip to content

Commit

Permalink
-rant
Browse files Browse the repository at this point in the history
  • Loading branch information
crpb committed Aug 9, 2023
1 parent fbb85f5 commit d5afd00
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions fnt
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,21 @@ case "$1" in

# get package infos
name="$p"
infos="$(unxz -c "${PACKAGES}" | awk "/^Package: ${name}/,/^$/" |awk '/^(Version|Installed-Size|Description|Filename|Size): /')"
ver=$(echo "$infos" | awk '/^Version: /{print$2}')
instsize=$(echo "$infos" | awk '/^Installed-Size: /{print$2}')
downsize=$(echo "$infos" | awk '/^Size: /{print$2}')
fpath=$(echo "$infos" | awk '/^Filename: /{print$2}')
infos="$(unxz -c "${PACKAGES}" | awk "/^Package: ${name}$/,/^$/" | awk '/^(Version|Installed-Size|Filename|Size): /')"
ver="$(echo "$infos" | awk '/^Version: /{print$2}')"
instsize="$(echo "$infos" | awk '/^Installed-Size: /{print$2}')"
downsize="$(echo "$infos" | awk '/^Size: /{print$2}')"
fpath="$(echo "$infos" | awk '/^Filename: /{print$2}')"
f="$(basename "$fpath")"
echo "Installing ${name} ${ver} [${downsize} ${instsize}000 ${MIRROR}/${fpath}]..."
curl -s "${MIRROR}/${fpath}" -o "${TMPDIR}/$f"
cd "${TMPDIR}" || exit 1
data="$(ar t "$f" | grep data)"
data="$(ar t "$f" | grep '^data.')"
ar x "$f" "$data"
tar xJf "$data"
tar xf "$data"
find "${TMPDIR}" -name "*.?tf" -exec cp {} "$target" \;
rm "$f" "$data"
rm -rf "${TMPDIR:?}/usr"
rm -rf "${TMPDIR:?}/"{usr,etc}
;;
remove|-r)
echo "Removing..."
Expand Down

0 comments on commit d5afd00

Please sign in to comment.