mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-02-08 07:28:40 +01:00
Misc updates
This commit is contained in:
parent
ac6caf5fb9
commit
181289473b
@ -5,14 +5,15 @@ CopyCfg() {
|
|||||||
for Type in "" "."
|
for Type in "" "."
|
||||||
do
|
do
|
||||||
[ "$(whoami)" = "root" ] && [ -d "$1/Root" ] && \
|
[ "$(whoami)" = "root" ] && [ -d "$1/Root" ] && \
|
||||||
cp -r $(find "$1/Root" -maxdepth 1 -mindepth 1 -name "$Type*") /
|
cp -r $(find "$1/Root" -maxdepth 1 -mindepth 1 -name "${Type}*") /
|
||||||
[ -d "$1/Home" ] && \
|
[ "$(whoami)" != "root" ] && [ -d "$1/Home" ] && \
|
||||||
cp -r $(find "$1/Home" -maxdepth 1 -mindepth 1 -name "$Type*") ~/
|
cp -r $(find "$1/Home" -maxdepth 1 -mindepth 1 -name "${Type}*") ~/
|
||||||
|
# TODO: && cat all *.part.{head,tail} files into their respective one
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
Cur="$1"
|
Cur="$1"
|
||||||
while [ ! -z "$Cur" ]
|
while [ -n "$Cur" ]
|
||||||
do
|
do
|
||||||
if [ -d "$Cur" ]
|
if [ -d "$Cur" ]
|
||||||
then
|
then
|
||||||
|
24
Lib.sh
24
Lib.sh
@ -1,12 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
ScopePath=""
|
||||||
|
SetScope(){
|
||||||
|
[ "$1" = "Root" ] && ScopePath="/"
|
||||||
|
[ "$1" = "Home" ] && ScopePath="${HOME}/"
|
||||||
|
}
|
||||||
|
|
||||||
mkcd(){
|
mkcd(){
|
||||||
mkdir -vp "$1" && \
|
mkdir -vp "./$1" && \
|
||||||
cd "$1"
|
cd "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
cpdir(){
|
cpfile(){
|
||||||
echo "'$1'"
|
echo "$1"
|
||||||
mkdir -p "$1" && \
|
rm -rf "./$1" && \
|
||||||
cp -rT "/$1" "./$1"
|
mkdir -p "./$1" && \
|
||||||
|
rm -rf "./$1" && \
|
||||||
|
cp --no-target-directory "${ScopePath}$1" "./$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
cpdir(){
|
||||||
|
echo "$1"
|
||||||
|
mkdir -p "./$1" && \
|
||||||
|
cp --recursive --no-target-directory "${ScopePath}$1" "./$1"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"colorscheme": "simple",
|
"colorscheme": "simple",
|
||||||
|
"mkparents": true,
|
||||||
"softwrap": true,
|
"softwrap": true,
|
||||||
"wordwrap": true
|
"wordwrap": true
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
alias cd..="cd .."
|
alias cd..="cd .."
|
||||||
|
|
||||||
alias miclisten="pactl load-module module-loopback latency_msec=1"
|
alias MicListen="pactl load-module module-loopback latency_msec=1"
|
||||||
alias micunlisten="pactl unload-module module-loopback"
|
alias MicUnlisten="pactl unload-module module-loopback"
|
||||||
|
|
||||||
# alias tcpdumpeth="sudo tcpdump -i enp37s0 -l -Q in"
|
# alias tcpdumpeth="sudo tcpdump -i enp37s0 -l -Q in"
|
||||||
alias termbin="nc termbin.com 9999"
|
alias termbin="nc termbin.com 9999"
|
||||||
|
|
||||||
alias gitclone1="git clone --depth 1"
|
alias gitclone1="git clone --depth 1"
|
||||||
|
alias gitclone9="git clone --depth 2147483647"
|
||||||
|
|
||||||
alias pngcrs="pngcrush -brute"
|
alias pngcrs="pngcrush -brute -reduce"
|
||||||
|
alias pngqnt100="pngquant -v --strip --speed=1 --quality=100-100"
|
||||||
|
alias pngqnt="pngquant -v --strip --speed=1"
|
||||||
|
|
||||||
|
#alias chrootrun-jammy="sudo chrootrun /opt/rootfs/UbuntuJammy"
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
export EDITOR=micro
|
export EDITOR=micro
|
||||||
|
export PATH=$PATH:$HOME/.local/bin
|
||||||
|
export PATH=$PATH:$HOME/.local/sbin
|
||||||
|
|
||||||
export ANDROID_HOME=$HOME/Android/Sdk
|
export ANDROID_HOME=$HOME/Android/Sdk
|
||||||
export ANDROID_SDK_ROOT=$HOME/Android/Sdk
|
export ANDROID_SDK_ROOT=$HOME/Android/Sdk
|
||||||
export PATH=$PATH:$ANDROID_HOME/tools
|
export PATH=$PATH:$ANDROID_HOME/tools
|
||||||
export PATH=$PATH:$ANDROID_HOME/platform-tools
|
export PATH=$PATH:$ANDROID_HOME/platform-tools
|
||||||
|
|
||||||
export PATH=$PATH:$HOME/.cargo/bin
|
export PATH=$PATH:$HOME/.cargo/bin
|
||||||
|
|
||||||
export PATH=$PATH:$HOME/.local/bin
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
export DOTNET_ROOT=$HOME/dotnet
|
||||||
|
export PATH=$PATH:$HOME/dotnet
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
function cdexec() {
|
#!/bin/sh
|
||||||
cd "$( dirname "$( realpath "$@" )" )"
|
|
||||||
basename "$@"
|
#function cdexec() {
|
||||||
}
|
# cd "$( dirname "$( realpath "$@" )" )"
|
||||||
|
# basename "$@"
|
||||||
|
#}
|
||||||
|
|
||||||
function touchx() {
|
function touchx() {
|
||||||
touch "$@"
|
touch "$@"
|
||||||
@ -11,17 +13,13 @@ function touchx() {
|
|||||||
function ccr() {
|
function ccr() {
|
||||||
gcc "$@" && ./a.out
|
gcc "$@" && ./a.out
|
||||||
}
|
}
|
||||||
|
|
||||||
function cxxr() {
|
function cxxr() {
|
||||||
g++ "$@" && ./a.out
|
g++ "$@" && ./a.out
|
||||||
}
|
}
|
||||||
|
|
||||||
function gitacp() {
|
function gitacp() {
|
||||||
git add .
|
git add . && git commit -m "$1" && git push
|
||||||
git commit -m "$1" && git push
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function gitacpc() {
|
function gitacpc() {
|
||||||
git add .
|
git add . && git commit && git push
|
||||||
git commit && git push
|
|
||||||
}
|
}
|
9
Misc/Repo.Update.sh
Executable file
9
Misc/Repo.Update.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "$( dirname "$( realpath "$0" )" )"
|
||||||
|
. ../Lib.sh
|
||||||
|
|
||||||
|
SetScope Home
|
||||||
|
mkcd ./Home
|
||||||
|
cpdir .dotfiles
|
||||||
|
cpfile .tmux.conf
|
||||||
|
cpfile .config/micro/settings.json
|
@ -9,5 +9,5 @@ Install oneliner (run as root to install system components) (as I just said, don
|
|||||||
--> elif [ -n "$(which wget)" ]; <!--
|
--> elif [ -n "$(which wget)" ]; <!--
|
||||||
--> then wget -O - "$Url" | sh; <!--
|
--> then wget -O - "$Url" | sh; <!--
|
||||||
--> else echo "Missing tools. Install \`curl\` or \`wget\`."; <!--
|
--> else echo "Missing tools. Install \`curl\` or \`wget\`."; <!--
|
||||||
--> fi
|
--> fi; <!--
|
||||||
</pre>
|
--></pre>
|
||||||
|
@ -4,6 +4,7 @@ cd "$( dirname "$( realpath "$0" )" )"
|
|||||||
|
|
||||||
h=home/pi
|
h=home/pi
|
||||||
|
|
||||||
|
SetScope Root
|
||||||
mkcd ./Root
|
mkcd ./Root
|
||||||
mkdir -vp ./etc
|
mkdir -vp ./etc
|
||||||
for p in \
|
for p in \
|
||||||
@ -34,6 +35,7 @@ mkcd ./Root
|
|||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
SetScope Home
|
||||||
mkcd ./Home
|
mkcd ./Home
|
||||||
#mkdir -vp ./.config
|
#mkdir -vp ./.config
|
||||||
#for p in \
|
#for p in \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user