pikman-update-manager/data/modify_repo.sh

26 lines
628 B
Bash
Raw Normal View History

2024-09-22 21:06:45 +02:00
#! /bin/bash
2024-09-24 19:00:27 +02:00
set -e
2024-09-22 21:06:45 +02:00
if [[ "$1" == "deb822_move" ]]
then
mv -vf "/tmp/"$2".sources" "/etc/apt/sources.list.d/"$2".sources"
elif [[ "$1" == "legacy_move" ]]
then
mv -vf "/tmp/"$2".list" "/etc/apt/sources.list.d/"$2".list"
2024-09-24 19:00:27 +02:00
elif [[ "$1" == "deb822_move_with_wget" ]]
then
wget -O $4 $3
mv -vf "/tmp/"$2".sources" "/etc/apt/sources.list.d/"$2".sources"
elif [[ "$1" == "legacy_move_with_wget" ]]
then
wget -O $4 $3
mv -vf "/tmp/"$2".list" "/etc/apt/sources.list.d/"$2".list"
2024-09-22 21:06:45 +02:00
elif [[ "$1" == "delete_deb822" ]]
then
rm -rvf $2
rm -rvf $3
elif [[ "$1" == "delete_legacy" ]]
then
rm -rvf $2
fi