diff --git a/desktop/install b/desktop/install index 694c987..d0f1a55 100755 --- a/desktop/install +++ b/desktop/install @@ -2,6 +2,20 @@ set -euo pipefail cd -- "$(dirname -- "$0")" . ../mod.bash + +function install_gsettings() { + local uid + local gsettings_file + local gsettings_dir + uid=${SUDO_UID:-$(id -u)} + gsettings_file=$1 + gsettings_dir=$2 + < "$gsettings_file" \ + sudo --user="#$uid" \ + DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus" \ + dconf load "$gsettings_dir" +} + (($(id -u) == 0)) \ && [[ -f /etc/debian_version ]] \ && install_apt_packages diff --git a/mod.bash b/mod.bash index 1505e74..e73f99d 100644 --- a/mod.bash +++ b/mod.bash @@ -1,16 +1,3 @@ -function install_apt_packages() { - local packages - local apt_sources_dir - . packages.bash - eval "$(apt-config shell apt_sources_dir 'Dir::Etc::sourceparts/d')" - rsync -rv etc/apt/keyrings/ /usr/share/keyrings/ - rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir" - [[ -d etc/default ]] \ - && rsync -rv etc/default/ /etc/default/ - apt update - apt install -y "${packages[@]}" -} - function install_dotfiles() { local home local dotfile @@ -26,6 +13,19 @@ function install_dotfiles() { done } +function install_apt_packages() { + local packages + local apt_sources_dir + . packages.bash + eval "$(apt-config shell apt_sources_dir 'Dir::Etc::sourceparts/d')" + rsync -rv etc/apt/keyrings/ /usr/share/keyrings/ + rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir" + [[ -d etc/default ]] \ + && rsync -rv etc/default/ /etc/default/ + apt update + apt install -y "${packages[@]}" +} + function install_addons() { local addon for addon in "$@"; do @@ -35,16 +35,3 @@ function install_addons() { ) done } - -function install_gsettings() { - local uid - local gsettings_file - local gsettings_dir - uid=${SUDO_UID:-$(id -u)} - gsettings_file=$1 - gsettings_dir=$2 - < "$gsettings_file" \ - sudo --user="#$uid" \ - DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus" \ - dconf load "$gsettings_dir" -} diff --git a/termux/install b/termux/install new file mode 100755 index 0000000..65394e9 --- /dev/null +++ b/termux/install @@ -0,0 +1,12 @@ +#!/bin/bash +set -euo pipefail +cd -- "$(dirname -- "$0")" + +function install_pkg_packages() { + local packages + . packages.bash + pkg upgrade -y + pkg install -y "${packages[@]}" +} + +install_pkg_packages diff --git a/termux/packages.bash b/termux/packages.bash new file mode 100644 index 0000000..0032e5f --- /dev/null +++ b/termux/packages.bash @@ -0,0 +1,12 @@ +packages=( +dnsutils +gh +git +iproute2 +jq +mdbook +nodejs-lts +openssh +rclone +sqlite +)