Skip to content

Commit 1c71416

Browse files
committed
build-x86-images: force-create symlinks and clean up after each variant
fixes invocation without any args
1 parent a11db74 commit 1c71416

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

build-x86-images.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ INCLUDEDIR=$(mktemp -d)
3333
trap "cleanup" INT TERM
3434

3535
cleanup() {
36-
rm -r "$INCLUDEDIR"
36+
rm -rf "$INCLUDEDIR"
3737
}
3838

3939
setup_pipewire() {
4040
PKGS="$PKGS pipewire alsa-pipewire"
4141
mkdir -p "$INCLUDEDIR"/etc/xdg/autostart
42-
ln -s /usr/share/applications/pipewire.desktop "$INCLUDEDIR"/etc/xdg/autostart/
42+
ln -sf /usr/share/applications/pipewire.desktop "$INCLUDEDIR"/etc/xdg/autostart/
4343
mkdir -p "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d
44-
ln -s /usr/share/examples/wireplumber/10-wireplumber.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/
45-
ln -s /usr/share/examples/pipewire/20-pipewire-pulse.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/
44+
ln -sf /usr/share/examples/wireplumber/10-wireplumber.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/
45+
ln -sf /usr/share/examples/pipewire/20-pipewire-pulse.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/
4646
mkdir -p "$INCLUDEDIR"/etc/alsa/conf.d
47-
ln -s /usr/share/alsa/alsa.conf.d/50-pipewire.conf "$INCLUDEDIR"/etc/alsa/conf.d
48-
ln -s /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf "$INCLUDEDIR"/etc/alsa/conf.d
47+
ln -sf /usr/share/alsa/alsa.conf.d/50-pipewire.conf "$INCLUDEDIR"/etc/alsa/conf.d
48+
ln -sf /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf "$INCLUDEDIR"/etc/alsa/conf.d
4949
}
5050

5151
build_variant() {
@@ -122,6 +122,8 @@ EOF
122122
fi
123123

124124
./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" -I "$INCLUDEDIR" ${REPO} "$@"
125+
126+
cleanup
125127
}
126128

127129
if [ ! -x mklive.sh ]; then

0 commit comments

Comments
 (0)