add fetch and unpk command and change some profile
This commit is contained in:
parent
c33a064bb5
commit
56b133cc80
3 changed files with 38 additions and 0 deletions
8
files/.local/bin/fetch
Executable file
8
files/.local/bin/fetch
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "$USER@$(hostname)"
|
||||||
|
echo 'os: Void Linux x86_64-musl'
|
||||||
|
echo "uptime:$(uptime -p | tr -d 'up')"
|
||||||
|
echo "ip: $(ip a | grep '192.168.178' | cut -d\ -f6 | cut -d/ -f1)"
|
||||||
|
echo "pkgs: $(xbps-query -lm | wc -l)"
|
||||||
|
echo "mem: $(free -Lm | cut -dU -f4 | cut -d' ' -f10) MiB"
|
||||||
29
files/.local/bin/unpk
Executable file
29
files/.local/bin/unpk
Executable file
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# extract archives
|
||||||
|
# depends: unzip unace unrar 7z
|
||||||
|
|
||||||
|
if test -z "$1"; then
|
||||||
|
echo "usage: $(basename $0) ARCHIVE ..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
while test -n "$1"; do
|
||||||
|
case "$1" in
|
||||||
|
*.tar.gz | *.tgz) tar xzf "$1";;
|
||||||
|
*.tar.bz2 | *.tbz) tar xjf "$1";;
|
||||||
|
*.tar.xz) tar xf "$1";;
|
||||||
|
*.zip) unzip "$1";;
|
||||||
|
*.jar) unzip "$1";;
|
||||||
|
*.war) unzip "$1";;
|
||||||
|
*.ace) unace x "$1";;
|
||||||
|
*.rar) unrar x "$1";;
|
||||||
|
*.7z) 7z x "$1";;
|
||||||
|
*.tar) tar xf "$1";;
|
||||||
|
*.gz) gunzip "$1";;
|
||||||
|
*.bz2) bunzip2 "$1";;
|
||||||
|
*) echo "file format not supported: $1";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
@ -3,6 +3,7 @@ export ENV="$HOME/.shrc"
|
||||||
export PATH="$HOME/.local/bin/":"$PATH"
|
export PATH="$HOME/.local/bin/":"$PATH"
|
||||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig
|
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig
|
||||||
export XKB_DEFAULT_LAYOUT=de
|
export XKB_DEFAULT_LAYOUT=de
|
||||||
|
export XBPS_DISTDIR="$HOME/void-packages"
|
||||||
|
|
||||||
exists() {
|
exists() {
|
||||||
which "$1" >/dev/null 2>&1
|
which "$1" >/dev/null 2>&1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue