Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions resources/linux/debian/common/postinst.repo.template
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ SIGNINGKEY
# If our package repository hasn't been configured yet, set it up.
if [ -d "$APT_SOURCE_LIST_DIR" ]; then
APT_SOURCE_LIST="${APT_SOURCE_LIST_DIR}@@REPO_NAME@@.list"
if [ ! -f "$APT_SOURCE_LIST" ]; then
APT_SOURCE_DEB822="${APT_SOURCE_LIST_DIR}@@REPO_NAME@@.sources"
if [ -f "$APT_SOURCE_DEB822" ]; then
# Prefer an existing Deb822 source created by apt modernize-sources.
# Keeping both files produces duplicate-source warnings on apt update.
rm -f "$APT_SOURCE_LIST"
elif [ ! -f "$APT_SOURCE_LIST" ]; then
# If the source list directory exists but our repository isn't
# configured within it, install our repo.
cat > "$APT_SOURCE_LIST" <<EOF
Expand All @@ -93,4 +98,3 @@ deb [arch=@@ARCH@@ signed-by=$SIGNING_KEY_PATH] https://releases.warp.dev/linux/
EOF
fi
fi

1 change: 1 addition & 0 deletions resources/linux/debian/common/postrm.repo.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ rm -f "${APT_TRUSTED_KEYRING_DIR}@@REPO_NAME@@.gpg"
# then delete our entry.
eval $("$APT_CONFIG" shell APT_SOURCE_LIST_DIR 'Dir::Etc::sourceparts/d')
rm -f "${APT_SOURCE_LIST_DIR}@@REPO_NAME@@.list"
rm -f "${APT_SOURCE_LIST_DIR}@@REPO_NAME@@.sources"