-
-
Save SDRausty/d801c01a996357bac98dfce3f345a1a6 to your computer and use it in GitHub Desktop.
au from https://github.com/sdrausty/au
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env sh | |
# Copyright 2017-2019 (c) all rights reserved by SDRausty. | |
# https://sdrausty.github.io/au Contributors: frumpylava/Glow, Hax4us | |
# $ dpkg --purge name.pkg; dpkg --install name.pkg ## downgrades packages. | |
# External microSD card destination is preferred to save space on devices. | |
################################################################################ | |
mkdir -p "/storage/emulated/0/tdebs" | |
apt update # updates packages list | |
apt -o APT::Keep-Downloaded-Packages="true" upgrade -y # upgrades | |
apt -o APT::Keep-Downloaded-Packages="true" install $@ -y # installs | |
mv "$PREFIX"/var/cache/apt/archives/*.deb /storage/emulated/0/tdebs >&2 | |
## In order to save native space on device, change ^the path above^ to a microSDcard destination. | |
#OEF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-r--r--r-- au
You can use
au
📲 to backup you installation files in Termux, i.e. debs. If you find your system unstable after updating, you can try to usedpkg --purge pkg_name
and thendpkg --install pkg_name
from/sdcard/debs
to downgrade packages to a previous version of a package in the hope of regaining system stability in Termux.You should use
au
from your$PATH
. To see your$PATH
, type$PATH
+enter/return. Then usemv au destination_directory
to moveau
to your$PATH
.au
+enter/return will update and backup your Termux in three keystrokes!Every time you want to
apt update && apt upgrade
orpkg up
, you shall also be backing up your former installation debs to/sdcard/debs
by usingau
. Ideally, you should change/sdcard/debs
to an external mirco SD card destination in lines 9 and 11 of au to save space on device.If you find your system unstable, you can use
dpkg --purge pkg_name
and thendpkg --install pkg_name
from/sdcard/debs
to downgrade packages to a previous version of a package in the hope of regaining package stability.Important: Please use
apt -o APT::Keep-Downloaded-Packages="true" install package_name(s)
to populate your backup directory in conjunction withau
to ensure that you can enjoy a full backup of*.deb
files on device.