Add a separate script for configuring logo-ls
This commit is contained in:
parent
a415bd5361
commit
a6b3e40709
2 changed files with 9 additions and 8 deletions
6
scripts/Common/Config/logo-ls/install.sh
Executable file
6
scripts/Common/Config/logo-ls/install.sh
Executable 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;
|
|
@ -2,18 +2,13 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
sudo bash "$BASH_SOURCE" "$USER";
|
||||
. "../../../Common/Config/logo-ls/install.sh";
|
||||
popd > /dev/null;
|
||||
else
|
||||
package="$(mktemp)";
|
||||
wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O "$package";
|
||||
dpkg -i "$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
|
||||
|
|
Loading…
Reference in a new issue