Add eza as autoinstall option
This commit is contained in:
parent
2779597e69
commit
9a0276e495
3 changed files with 23 additions and 4 deletions
|
@ -21,7 +21,12 @@ _autoinstall_base () {
|
||||||
&& _autoinstall_exe \
|
&& _autoinstall_exe \
|
||||||
"https://github.com/TheLocehiliosan/yadm/raw/master/yadm" \
|
"https://github.com/TheLocehiliosan/yadm/raw/master/yadm" \
|
||||||
"$HOME/.local/bin/yadm" \
|
"$HOME/.local/bin/yadm" \
|
||||||
&& yadm alt
|
|
||||||
|
[ ! -x "$(command -v "eza")" ] \
|
||||||
|
&& _autoinstall_exe \
|
||||||
|
"https://github.com/eza-community/eza/releases/download/v0.17.0/eza_x86_64-unknown-linux-gnu.tar.gz" \
|
||||||
|
"$HOME/.local/bin/eza" \
|
||||||
|
"tar xzO"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -71,6 +76,8 @@ _autoinstall_all () {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $1: URL
|
||||||
|
# $2: path
|
||||||
_autoinstall_git () {
|
_autoinstall_git () {
|
||||||
if [ ! -d "$2" ]
|
if [ ! -d "$2" ]
|
||||||
then
|
then
|
||||||
|
@ -82,6 +89,9 @@ _autoinstall_git () {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $1: URL
|
||||||
|
# $2: path
|
||||||
|
# $3: curl pipe
|
||||||
_autoinstall_file () {
|
_autoinstall_file () {
|
||||||
if [ ! -f "$2" ]
|
if [ ! -f "$2" ]
|
||||||
then
|
then
|
||||||
|
@ -89,12 +99,14 @@ _autoinstall_file () {
|
||||||
file_path=$(dirname "$2")
|
file_path=$(dirname "$2")
|
||||||
mkdir -p "$file_path"
|
mkdir -p "$file_path"
|
||||||
cd "$file_path" || exit
|
cd "$file_path" || exit
|
||||||
curl -fsSLo "$2" "$1"
|
curl -fsSL "$1" | eval "${3:-cat}" > "$2"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $1: text
|
||||||
|
# $2: path
|
||||||
_autoinstall_text() {
|
_autoinstall_text() {
|
||||||
if [ ! -f "$2" ]
|
if [ ! -f "$2" ]
|
||||||
then
|
then
|
||||||
|
@ -108,10 +120,15 @@ _autoinstall_text() {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $1: URL
|
||||||
|
# $2: path
|
||||||
|
# $3: curl pipe
|
||||||
_autoinstall_exe () {
|
_autoinstall_exe () {
|
||||||
_autoinstall_file "$1" "$2" && chmod +x "$2"
|
_autoinstall_file "$1" "$2" "$3" && chmod +x "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $1: URL
|
||||||
|
# $2: path
|
||||||
_autoinstall_archive () {
|
_autoinstall_archive () {
|
||||||
if [ ! -f "$2" ]
|
if [ ! -f "$2" ]
|
||||||
then
|
then
|
||||||
|
@ -126,6 +143,8 @@ _autoinstall_archive () {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $1: template
|
||||||
|
# $2: path
|
||||||
_autoinstall_env () {
|
_autoinstall_env () {
|
||||||
if [ -x "$(command -v envsubst)" ]
|
if [ -x "$(command -v envsubst)" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
git # git
|
git # git
|
||||||
gitflow # tool for git workflow
|
gitflow # tool for git workflow
|
||||||
git-lfs # git support for large files
|
git-lfs # git support for large files
|
||||||
|
hostname # tool to get hostname
|
||||||
jq # tool for json
|
jq # tool for json
|
||||||
moar # moar is less
|
moar # moar is less
|
||||||
nix-direnv # allow better nix and direnv integration
|
nix-direnv # allow better nix and direnv integration
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
cliphist # clipboard manager (history)
|
cliphist # clipboard manager (history)
|
||||||
grim # needed for screenshots/flameshot
|
grim # needed for screenshots/flameshot
|
||||||
slurp # needed for screenshots
|
slurp # needed for screenshots
|
||||||
swww # wallpaper daemon
|
|
||||||
wl-clipboard # clipboard manager (tools)
|
wl-clipboard # clipboard manager (tools)
|
||||||
#xdg-desktop-portal
|
#xdg-desktop-portal
|
||||||
#xdg-desktop-portal-hyprland
|
#xdg-desktop-portal-hyprland
|
||||||
|
|
Loading…
Reference in a new issue