Skip to content

Commit 18b776e

Browse files
committed
Update ppa filename to match apt-add-repository
1 parent 2ec652d commit 18b776e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/scripts/tools/ppa.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ add_list() {
129129
arch=$(dpkg --print-architecture)
130130
[ -e "$key_source" ] && key_file=$key_source || key_file="$key_dir"/"${ppa/\//-}"-keyring.gpg
131131
add_key "$ppa" "$ppa_url" "$package_dist" "$key_source" "$key_file"
132-
echo "deb [arch=$arch signed-by=$key_file] $ppa_url $package_dist $branches" | sudo tee -a "$list_dir"/"${ppa/\//-}".list >/dev/null 2>&1
132+
sudo rm -rf "$list_dir"/"${ppa/\//-}".list || true
133+
echo "deb [arch=$arch signed-by=$key_file] $ppa_url $package_dist $branches" | sudo tee -a "$list_dir"/"${ppa%%/*}"-"$ID"-"${ppa#*/}"-"$package_dist".list >/dev/null 2>&1
133134
update_lists "$ppa" "$ppa_search"
134135
. /etc/os-release
135136
fi

0 commit comments

Comments
 (0)