mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +00:00
add apt removing to termux
This commit is contained in:
parent
16a462abdd
commit
f146cf65a2
@ -69,7 +69,7 @@ mkdir -p ${APT_BACKUP_PATH}
|
||||
(cd ${APT_PATH}; find . -type f -iname "*.deb") | sed 's+^\./++' > ${local_filelist}
|
||||
comm <(sort $remote_filelist) <(sort $local_filelist) -13 | while read file; do
|
||||
echo "deleting ${file}"
|
||||
mv $file ${APT_BACKUP_PATH}
|
||||
mv "${APT_PATH}/$file" ${APT_BACKUP_PATH}
|
||||
done
|
||||
|
||||
rm ${remote_filelist} ${local_filelist}
|
||||
|
13
termux.sh
13
termux.sh
@ -11,9 +11,20 @@ base_url=${TUNASYNC_UPSTREAM_URL:-"https://termux.net"}
|
||||
|
||||
ARCHES=("aarch64" "all" "arm" "i686")
|
||||
|
||||
remote_filelist="${BASE_PATH}/filelist.remote"
|
||||
local_filelist="${BASE_PATH}/filelist.local"
|
||||
|
||||
for arch in ${ARCHES[@]}; do
|
||||
echo "start syncing: ${arch}"
|
||||
apt-download-binary "${base_url}" "stable" "main" "${arch}" "${BASE_PATH}" || true
|
||||
apt-download-binary "${base_url}" "stable" "main" "${arch}" "${BASE_PATH}" ${remote_filelist} || true
|
||||
done
|
||||
|
||||
BACKUP_PATH="${BASE_PATH}/backup/"
|
||||
mkdir -p ${BACKUP_PATH}
|
||||
(cd ${BASE_PATH}; find . -type f -iname "*.deb") | sed 's+^\./++' > ${local_filelist}
|
||||
comm <(sort $remote_filelist) <(sort $local_filelist) -13 | while read file; do
|
||||
echo "deleting ${file}"
|
||||
mv "${BASE_PATH}/$file" ${BACKUP_PATH}
|
||||
done
|
||||
|
||||
echo "finished"
|
||||
|
@ -33,7 +33,7 @@ mkdir -p ${APT_BACKUP_PATH}
|
||||
(cd ${APT_PATH}; find . -type f -iname "*.deb") | sed 's+^\./++' > ${local_filelist}
|
||||
comm <(sort $remote_filelist) <(sort $local_filelist) -13 | while read file; do
|
||||
echo "deleting ${file}"
|
||||
mv $file ${APT_BACKUP_PATH}
|
||||
mv "${APT_PATH}/$file" ${APT_BACKUP_PATH}
|
||||
done
|
||||
|
||||
rm ${remote_filelist} ${local_filelist}
|
||||
|
Loading…
x
Reference in New Issue
Block a user