Update sources to deb822 format.

This commit is contained in:
cyteen 2026-02-24 01:53:27 +00:00
parent 5019dfbd55
commit b5af7ba965
1 changed files with 38 additions and 10 deletions

View File

@ -1,39 +1,67 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# httm is an interactive, file-level Time Machine-like tool for ZFS/btrfs/NILFS2
# at provides wrapper scripts that demonstrate how to use the httm command line:
# - bowie.bash displays the difference between unique snapshot versions and the live file.
# - equine.bash mount APFS snapshots for use with httm.
# - nicotine.bash converts unique snapshot file versions to a $git archive.
# - ounce.bash snapshots the datasets of files opened by another programs. only when you have file changes outstanding, uncommitted to a snapshot already
# - preview-bootstrap.bash bridges httm to fzf, handles the "Preview" window functionality.
# - zdbstat.bash prints the underlying zdb metadata for a ZFS object.
DEST=${1:-/etc/skel} DEST=${1:-/etc/skel}
set -x set -x
URL=raw.githubusercontent.com/ URL=raw.githubusercontent.com/
USER=kimono-koans USER=kimono-koans
APP="httm" APP="httm"
KEY="${USER}.gpg" KEY_HOME=/usr/share/keyrings
KEY=${KEY_HOME}/"${USER}.gpg"
packages="httm" packages="httm"
echo "deb [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee /etc/apt/sources.list-available/${APP}-ppa.list # echo "deb [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee /etc/apt/sources.list-available/${APP}-ppa.list
echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee -a /etc/apt/sources.list-available/${APP}-ppa.list # echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee -a /etc/apt/sources.list-available/${APP}-ppa.list
conf_print_httm_sources() {
cat <<EOF
Types: deb deb-src
URIs: https://${URL}/${USER}/ppa/main/
Suites: ./
Components:
Signed-By: ${KEY}
EOF
}
conf_print_httm_sources | sudo tee /etc/apt/sources.list-available/httm-ppa.sources >/dev/null
sudo ln -sf /etc/apt/sources.list-available/${APP}-ppa.list /etc/apt/sources.list.d/${APP}-ppa.list sudo ln -sf /etc/apt/sources.list-available/${APP}-ppa.list /etc/apt/sources.list.d/${APP}-ppa.list
# Bypass apt-proxy for ${APP} packages # Bypass apt-proxy for ${APP} packages
if [ -d /etc/apt/apt.conf.d/02proxy ]; then if [ -d /etc/apt/apt.conf.d/02proxy ]; then
if [ "$(grep -q ${URL})" ]; then if [ "$(grep -q ${URL})" ]; then
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >>/etc/apt/apt.conf.d/02proxy
fi fi
else else
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >>/etc/apt/apt.conf.d/02proxy
fi fi
# broken "moved permanently" # broken "moved permanently"
# curl -s --compressed https://${URL}/${USER}/ppa/main/KEY.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/${KEY} >/dev/null # curl -s --compressed https://${URL}/${USER}/ppa/main/KEY.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/${KEY} >/dev/null
curl -Ls --compressed https://${URL}/${USER}/ppa/refs/heads/main/KEY.gpg | gpg --dearmor | sudo tee ${KEY} >/dev/null
sudo apt update sudo apt update
sudo apt install -y --no-install-recommends "$packages" sudo apt install -y --no-install-recommends "$packages"
# Using cargo
# https://crates.io/crates/httm
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# latest="(wget -nv -O - "https://api.github.com/repos/kimono-koans/httm/releases/latest" 2>/dev/null | grep tag_name | cut -d: -f2 | cut -d'"' -f2)"
# cargo install --locked --git https://github.com/kimono-koans/httm.git --tag "$latest"
# httm --install-zsh-hot-keys puts a file in ${HOME} and includes it in the .zshrc # httm --install-zsh-hot-keys puts a file in ${HOME} and includes it in the .zshrc
# httm: zsh hot keys script: source ~/.httm-key-bindings.zsh
# we put in the zshrc.d instead. # we put in the zshrc.d instead.
# Update with :r! curl -s https://raw.githubusercontent.com/kimono-koans/httm/refs/heads/master/scripts/httm-key-bindings.zsh
# httm/scripts/httm-key-bindings.zsh # httm/scripts/httm-key-bindings.zsh
cat <<"EOF" | sudo tee "${DEST}/.zshrc.d/008_httm-key-bindings.zsh" cat <<"EOF" | sudo tee "${DEST}/.zshrc.d/008_httm-key-bindings.zsh"
# ___ ___ ___ ___ # ___ ___ ___ ___
# /\__\ /\ \ /\ \ /\__\ # /\__\ /\ \ /\ \ /\__\
# /:/ / \:\ \ \:\ \ /::| | # /:/ / \:\ \ \:\ \ /::| |
@ -97,7 +125,7 @@ httm-lookup-widget() {
return $ret return $ret
} }
zle -N httm-lookup-widget zle -N httm-lookup-widget
bindkey '\em' httm-lookup-widget bindkey '\em' httm-lookup-widget
# ALT-s - select files on ZFS snapshots interactively # ALT-s - select files on ZFS snapshots interactively
@ -121,5 +149,5 @@ httm-select-widget() {
return $ret return $ret
} }
zle -N httm-select-widget zle -N httm-select-widget
bindkey '\es' httm-select-widget% bindkey '\es' httm-select-widget
EOF EOF