mirror of
https://github.com/G2-Games/welcome.sh.git
synced 2025-04-19 05:22:53 -05:00
Added preliminary work on a cleanup script to move files around
This commit is contained in:
parent
9cee7f2904
commit
4912cfa2c8
1 changed files with 25 additions and 0 deletions
25
cleanup.sh
Normal file
25
cleanup.sh
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
version=1
|
||||||
|
|
||||||
|
echo "Ensuring welcome.sh is installed in the new location..."
|
||||||
|
|
||||||
|
# Check if welcome.sh is installed in the old location
|
||||||
|
if [[ -f ~/.welcome ]]\
|
||||||
|
|| [[ -f ~/.welcome/welcome.sh ]]\
|
||||||
|
|| [[ -f ~/.welcome/config.cfg ]];
|
||||||
|
then
|
||||||
|
# Modify the files with proper paths
|
||||||
|
sed "${i}d" "$zshrc" > file.tmp && mv file.tmp "$zshrc"
|
||||||
|
|
||||||
|
# Create the directories in the proper spots
|
||||||
|
mkdir -p ~/.config/welcome.sh/
|
||||||
|
mkdir -p ~/.local/bin/
|
||||||
|
|
||||||
|
# Move the welcome files to the proper folders
|
||||||
|
mv ~/.welcome/config.cfg ~/.config/welcome.sh/config.cfg
|
||||||
|
mv ~/.welcome/welcome.sh ~/.local/bin/welcome.sh
|
||||||
|
|
||||||
|
echo "welcome.sh is now installed in the new location!"
|
||||||
|
else
|
||||||
|
echo "welcome.sh is already installed properly!"
|
||||||
|
fi
|
Loading…
Reference in a new issue