Fixes for termux

This commit is contained in:
Marko Korhonen 2022-09-21 00:08:44 +03:00
parent 2d102a105d
commit 1075a60db1
2 changed files with 9 additions and 2 deletions

View file

@ -328,6 +328,9 @@ include = ["terminal"]
include = ["terminal"] include = ["terminal"]
dotfiles = ["f_distro"] dotfiles = ["f_distro"]
[profiles.Isengard.variables]
distro_id = "termux"
[profiles.Mirkwood.variables] [profiles.Mirkwood.variables]
wayland = true wayland = true

View file

@ -33,8 +33,10 @@ pi() {
if [ -n "$SELECTED_PKGS" ]; then if [ -n "$SELECTED_PKGS" ]; then
{%@@ if distro_id == "arch" @@%} {%@@ if distro_id == "arch" @@%}
cmd="paru -S $(echo $SELECTED_PKGS)" cmd="paru -S $(echo $SELECTED_PKGS)"
{%@@ else @@%} {%@@ elif distro_id == "ubuntu" @@%}
cmd="sudo apt install $(echo $SELECTED_PKGS)" cmd="sudo apt install $(echo $SELECTED_PKGS)"
{%@@ elif distro_id == "termux" @@%}
cmd="apt install $(echo $SELECTED_PKGS)"
{%@@ endif @@%} {%@@ endif @@%}
# Append the expanded command to history # Append the expanded command to history
@ -54,8 +56,10 @@ pr() {
if [ -n "$SELECTED_PKGS" ]; then if [ -n "$SELECTED_PKGS" ]; then
{%@@ if distro_id == "arch" @@%} {%@@ if distro_id == "arch" @@%}
cmd="paru -Rns $(echo $SELECTED_PKGS)" cmd="paru -Rns $(echo $SELECTED_PKGS)"
{%@@ else @@%} {%@@ elif distro_id == "ubuntu" @@%}
cmd="sudo apt remove $(echo $SELECTED_PKGS)" cmd="sudo apt remove $(echo $SELECTED_PKGS)"
{%@@ elif distro_id == "termux" @@%}
cmd="apt remove $(echo $SELECTED_PKGS)"
{%@@ endif @@%} {%@@ endif @@%}
# Append the expanded command to history # Append the expanded command to history