aecdb34116
- 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
26 lines
620 B
Bash
Executable File
26 lines
620 B
Bash
Executable File
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
|