Add fetch and install scripts
- Add fetch script which fetches the current config that is used by the system into the git repo - Add install script which copies the config in the repo into the config folder for the user - Add waybar as config
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
parameter=$1
|
||||
|
||||
install() {
|
||||
if [[ $parameter == "all" ]] || [[ $parameter == $1 ]]; then
|
||||
echo "Installing $1 config in $2"
|
||||
rm -rf $2_backup/
|
||||
mv $2/ $2_backup/
|
||||
cp -r $1 $2/
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $parameter == '' ]]; then
|
||||
echo "No config specified, the following configs are available:"
|
||||
echo " all - all of the config files"
|
||||
while read name path; do
|
||||
echo " $name"
|
||||
done <configs
|
||||
exit
|
||||
fi
|
||||
|
||||
while read name path; do
|
||||
eval "name=$name" # re-evaluate the string as a path
|
||||
eval "path=$path" # re-evaluate the string as a path
|
||||
install $name $path
|
||||
done <configs
|
||||
Reference in New Issue
Block a user