We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 27e997c + 61a5ac3 commit dc0492cCopy full SHA for dc0492c
common/system/apt_get_config_set_fix_broken
@@ -0,0 +1,17 @@
1
+#! /usr/bin/env bash
2
+
3
+# This script is used to add or remove the setting fix-broken "true" from the apt-get configuration
4
+# It takes a single boolean parameter: whether to add the setting or remove it
5
6
+ACTIVATE=$1
7
8
+APT_CONFIG_FILE=/etc/apt/apt.conf.d/local
9
10
+# Always start by trying to remove the line to prevent duplicate entries
11
+sed --in-place '/Fix-Broken/d' $APT_CONFIG_FILE
12
13
+if [ "$ACTIVATE" = "True" ]; then
14
+ cat << EOF >> $APT_CONFIG_FILE
15
+Apt:Get {Fix-Broken "true";};
16
+EOF
17
+fi
0 commit comments