Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: further update scripts to work better with derivative distros. #103

Merged
merged 5 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
33 changes: 18 additions & 15 deletions scripts/install_pulseaudio_sources_apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,24 @@ if [ ! -d "$PULSE_DIR" ]; then
esac

# Make sure sources are available
if ! grep -q '^ *deb-src' /etc/apt/sources.list; then
echo "- Adding source repositories" >&2
cp /etc/apt/sources.list /tmp/sources.list
while read type url suite rest; do
if [ "$type" = deb ]; then
case "$suite" in
$codename | $codename-updates | $codename-security)
echo "deb-src $url $suite $rest"
;;
esac
fi
done </tmp/sources.list \
| sudo tee -a /etc/apt/sources.list >/dev/null
rm /tmp/sources.list
fi
for srclst in $(ls /etc/apt/*.list /etc/apt/sources.list.d/*.list 2> /dev/null); do
peanutbutterandcrackers marked this conversation as resolved.
Show resolved Hide resolved
if ! grep -q '^ *deb-src' $srclst; then
echo "- Adding source repositories" >&2
cp $srclst /tmp/sources.list
while read type url suite rest; do
if [ "$type" = deb ]; then
case "$suite" in
$codename | $codename-updates | $codename-security)
echo "deb-src $url $suite $rest"
;;
esac
fi
done </tmp/sources.list \
| sudo tee -a $srclst >/dev/null
rm /tmp/sources.list
fi
cat $srclst | grep $codename | sudo tee $srclst
peanutbutterandcrackers marked this conversation as resolved.
Show resolved Hide resolved
done

sudo apt-get update

Expand Down
2 changes: 1 addition & 1 deletion scripts/install_pulseaudio_sources_apt_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ echo "- Creating schroot config file $schroot_conf"
} | sudo tee $schroot_conf >/dev/null || exit $?

# Copy some files to the build root
for file in /etc/apt/sources.list; do
for file in $(ls /etc/apt/*.list /etc/apt/sources.list.d/*.list 2> /dev/null); do
peanutbutterandcrackers marked this conversation as resolved.
Show resolved Hide resolved
echo "- Copying $file to the root"
sudo install -m 0644 $file $BUILDROOT/$file || exit $?
done
Expand Down