Add a separate script for configuring logo-ls

This commit is contained in:
Manuel Thalmann 2023-04-04 11:07:31 +02:00
parent a415bd5361
commit a6b3e40709
2 changed files with 9 additions and 8 deletions

View file

@ -0,0 +1,6 @@
#!/bin/bash
{
echo "alias ls='logo-ls -D'";
echo "alias ll='ls -al'";
echo "alias l='ls'";
} | tee -a ~/.bashrc;

View file

@ -2,18 +2,13 @@
# Elevate script # Elevate script
if [ ! "$UID" -eq 0 ] if [ ! "$UID" -eq 0 ]
then then
pushd "${BASH_SOURCE%/*}" > /dev/null;
sudo bash "$BASH_SOURCE" "$USER"; sudo bash "$BASH_SOURCE" "$USER";
. "../../../Common/Config/logo-ls/install.sh";
popd > /dev/null;
else else
package="$(mktemp)"; package="$(mktemp)";
wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O "$package"; wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O "$package";
dpkg -i "$package"; dpkg -i "$package";
rm -f "$package"; rm -f "$package";
homeDir="$(sudo -u "$1" bash -c 'realpath ~')";
{
echo "alias ls='logo-ls -D'";
echo "alias ll='ls -al'";
echo "alias l='ls'";
} | sudo -u "$1" tee -a "$homeDir/.bashrc";
fi fi