20 lines
409 B
Bash
20 lines
409 B
Bash
|
#!/bin/bash
|
||
|
# Elevate script
|
||
|
if [ ! "$UID" -eq 0 ]
|
||
|
then
|
||
|
exec sudo bash "$0" "$USER"
|
||
|
fi
|
||
|
|
||
|
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 $homeDir/.bashrc
|