Renamed options from short numbered format (i.e. '-1', '-2') to long descriptive format (i.e. '--mmdebstrap', '--sources')

This commit is contained in:
2025-11-05 14:36:12 -05:00
parent 0b033e852c
commit d80992da00
3 changed files with 9 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ source \
"${BASEDIR}/system.conf" "${BASEDIR}/system.conf"
if [[ "${1}" == '-1' ]]; then if [[ "${1}" == '--mmdebstrap' ]]; then
packages=(\ packages=(\
console-setup \ console-setup \
cryptsetup \ cryptsetup \
@@ -48,7 +48,7 @@ zstd\
${include} \ ${include} \
"${VERSION_CODENAME}" \ "${VERSION_CODENAME}" \
/mnt /mnt
elif [[ "${1}" == '-2' ]]; then elif [[ "${1}" == '--network-interfaces' ]]; then
NETWORK_INTERFACE=($(ip -br addr show | sed 's| .*$||g' | grep -v '^lo' | grep -v 'tailscale' | grep -v '^wg')) NETWORK_INTERFACE=($(ip -br addr show | sed 's| .*$||g' | grep -v '^lo' | grep -v 'tailscale' | grep -v '^wg'))
shopt -s extglob shopt -s extglob
@@ -58,7 +58,7 @@ allow-hotplug ${NETWORK_INTERFACE[$i]}
iface ${NETWORK_INTERFACE[$i]} inet dhcp iface ${NETWORK_INTERFACE[$i]} inet dhcp
EOF EOF
done done
elif [[ "${1}" == '-3' ]]; then elif [[ "${1}" == '--sources' ]]; then
cat << EOF | tee /mnt/etc/apt/sources.list.d/${VERSION_CODENAME}.sources &> /dev/null cat << EOF | tee /mnt/etc/apt/sources.list.d/${VERSION_CODENAME}.sources &> /dev/null
# ${VERSION_CODENAME^} # ${VERSION_CODENAME^}
Enabled: yes Enabled: yes

View File

@@ -9,7 +9,7 @@ source \
"${BASEDIR}/system.conf" "${BASEDIR}/system.conf"
if [[ "${1}" == '-1' ]]; then if [[ "${1}" == '--mmdebstrap' ]]; then
packages=(\ packages=(\
console-setup \ console-setup \
cryptsetup \ cryptsetup \
@@ -44,7 +44,7 @@ zstd\
${include} \ ${include} \
"${UBUNTU_VERSION_CODENAME}" \ "${UBUNTU_VERSION_CODENAME}" \
/mnt /mnt
elif [[ "${1}" == '-2' ]]; then elif [[ "${1}" == '--sources' ]]; then
cat <<EOF >/mnt/etc/apt/sources.list.d/${UBUNTU_VERSION_CODENAME}.sources cat <<EOF >/mnt/etc/apt/sources.list.d/${UBUNTU_VERSION_CODENAME}.sources
# ${UBUNTU_VERSION_CODENAME^} # ${UBUNTU_VERSION_CODENAME^}
Enabled: yes Enabled: yes
@@ -90,11 +90,11 @@ Signed-By: /etc/apt/trusted.gpg.d/patches.key.asc
EOF EOF
rm /mnt/etc/apt/sources.list rm /mnt/etc/apt/sources.list
elif [[ "${1}" == '-3' ]]; then elif [[ "${1}" == '--skel' ]]; then
rsync -pogAXtlHrDx \ rsync -pogAXtlHrDx \
/etc/skel \ /etc/skel \
/mnt/etc /mnt/etc
elif [[ "${1}" == '-4' ]]; then elif [[ "${1}" == '--elementary' ]]; then
cp \ cp \
/etc/os-release \ /etc/os-release \
/mnt/etc /mnt/etc

View File

@@ -9,7 +9,7 @@ source \
"${BASEDIR}/system.conf" "${BASEDIR}/system.conf"
if [[ "${1}" == '-1' ]]; then if [[ "${1}" == '--rsync' ]]; then
mkdir -p /run/install mkdir -p /run/install
if [[ "${VERSION_ID}" -lt '41' ]]; then if [[ "${VERSION_ID}" -lt '41' ]]; then
@@ -24,7 +24,7 @@ if [[ "${1}" == '-1' ]]; then
--exclude=/etc/machine-id \ --exclude=/etc/machine-id \
--info=progress2 \ --info=progress2 \
/run/install/ /mnt /run/install/ /mnt
elif [[ "${1}" == '-2' ]]; then elif [[ "${1}" == '--resolv-conf' ]]; then
mv /mnt/etc/resolv.conf \ mv /mnt/etc/resolv.conf \
/mnt/etc/resolv.conf.orig /mnt/etc/resolv.conf.orig