mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-06-05 21:59:36 +02:00
Misc updates
This commit is contained in:
24
Lib.sh
24
Lib.sh
@@ -1,12 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
ScopePath=""
|
||||
SetScope(){
|
||||
[ "$1" = "Root" ] && ScopePath="/"
|
||||
[ "$1" = "Home" ] && ScopePath="${HOME}/"
|
||||
}
|
||||
|
||||
mkcd(){
|
||||
mkdir -vp "$1" && \
|
||||
mkdir -vp "./$1" && \
|
||||
cd "$1"
|
||||
}
|
||||
|
||||
cpdir(){
|
||||
echo "'$1'"
|
||||
mkdir -p "$1" && \
|
||||
cp -rT "/$1" "./$1"
|
||||
cpfile(){
|
||||
echo "$1"
|
||||
rm -rf "./$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"
|
||||
}
|
||||
|
Reference in New Issue
Block a user