Compare commits
3 Commits
a4f6ea6f9c
...
d186c475b0
| Author | SHA1 | Date | |
|---|---|---|---|
|
d186c475b0
|
|||
|
90fefb094e
|
|||
|
dff8209e31
|
22
boilerplate.sh
Executable file
22
boilerplate.sh
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
baseDir="$(realpath "$(dirname "${0}")")"
|
||||||
|
|
||||||
|
|
||||||
|
printf "Enter name of new script (without file extension):\n${baseDir}/"
|
||||||
|
read -r newScript
|
||||||
|
|
||||||
|
cat << EOF | tee "${baseDir}/${newScript}.sh" &> /dev/null
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
baseDir="\$(realpath "\$(dirname "\${0}")")"
|
||||||
|
|
||||||
|
source \\
|
||||||
|
/etc/os-release
|
||||||
|
source \\
|
||||||
|
"\${baseDir}/system.conf"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x "${baseDir}/${newScript}.sh"
|
||||||
37
namarupa.sh
Executable file
37
namarupa.sh
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
baseDir="$(realpath "$(dirname "${0}")")"
|
||||||
|
|
||||||
|
source \
|
||||||
|
/etc/os-release
|
||||||
|
source \
|
||||||
|
"${baseDir}/system.conf"
|
||||||
|
|
||||||
|
|
||||||
|
curl \
|
||||||
|
--progress \
|
||||||
|
--location \
|
||||||
|
--remote-name \
|
||||||
|
--continue-at - \
|
||||||
|
--output-dir '/tmp' \
|
||||||
|
'https://github.com/lenemter/wingpanel-indicator-namarupa/raw/main/com.github.lenemter.wingpanel-indicator-namarupa.deb'
|
||||||
|
|
||||||
|
apt \
|
||||||
|
--update \
|
||||||
|
install \
|
||||||
|
--yes \
|
||||||
|
'/tmp/com.github.lenemter.wingpanel-indicator-namarupa.deb'
|
||||||
|
|
||||||
|
mkdir \
|
||||||
|
-p \
|
||||||
|
/home/${username}/.config/autostart
|
||||||
|
|
||||||
|
cp \
|
||||||
|
/etc/xdg/autostart/indicator-application.desktop \
|
||||||
|
/home/${username}/.config/autostart/
|
||||||
|
|
||||||
|
sed \
|
||||||
|
-i \
|
||||||
|
's/^OnlyShowIn.*/OnlyShowIn=Unity;GNOME;Pantheon;/' \
|
||||||
|
/home/${username}/.config/autostart/indicator-application.desktop
|
||||||
16
post-inst.sh
16
post-inst.sh
@@ -111,26 +111,14 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${ID}" == 'elementary' ]]; then
|
if [[ "${ID}" == 'elementary' ]]; then
|
||||||
cat << EOF > /etc/apt/sources.list.d/backports.list
|
"${baseDir}/namarupa.sh"
|
||||||
deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_VERSION_CODENAME}-backports main restricted universe multiverse
|
|
||||||
deb-src http://archive.ubuntu.com/ubuntu/ ${UBUNTU_VERSION_CODENAME}-backports main restricted universe multiverse
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > /etc/apt/preferences.d/backports.pref
|
|
||||||
Package: *
|
|
||||||
Pin: release n=${UBUNTU_VERSION_CODENAME}*
|
|
||||||
Pin-Priority: 990
|
|
||||||
|
|
||||||
Package: linux* /wayland/
|
|
||||||
Pin: release n=${UBUNTU_VERSION_CODENAME}-backports
|
|
||||||
Pin-Priority: -1
|
|
||||||
EOF
|
|
||||||
elif [[ "${ID}" == 'debian' ]]; then
|
elif [[ "${ID}" == 'debian' ]]; then
|
||||||
"${baseDir}/debian.sh" --contrib
|
"${baseDir}/debian.sh" --contrib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
||||||
apt \
|
apt \
|
||||||
|
--update \
|
||||||
dist-upgrade \
|
dist-upgrade \
|
||||||
--yes
|
--yes
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user