Dir cleanup.
This commit is contained in:
parent
cf2edaa1e7
commit
ab60ec957f
4 changed files with 0 additions and 0 deletions
42
gaming/cxg_backup.sh
Executable file
42
gaming/cxg_backup.sh
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
##
|
||||
## Crossover Bottle Mass Backup Utility -- Bash edition.
|
||||
##
|
||||
## Written by Andrew Schott ( with help from bashscripts.org )
|
||||
## Send any questions to andrew@schotty.com
|
||||
|
||||
##
|
||||
## v1.1 -- Fixed paths for Crossover 11
|
||||
## v1.0 -- Initial release.
|
||||
##
|
||||
|
||||
## Set backup file directories.
|
||||
CXOBACKUPDIR="$HOME/cxobackup/"
|
||||
|
||||
## Set default CX bottle directories.
|
||||
CXODIR="$HOME/.cxoffice"
|
||||
|
||||
## Create backup directories if they do not exist.
|
||||
[ -d "$CXOBACKUPDIR" ] || mkdir "$CXOBACKUPDIR"
|
||||
|
||||
## Perform backup of .cxoffice
|
||||
for bottle in $CXODIR/*/
|
||||
do
|
||||
if [[ "$bottle" = "$CXODIR/desktopdata/" ]]
|
||||
then echo Skipping $bottle as it is a CX directory/file
|
||||
elif [[ "$bottle" = "$CXODIR/installers/" ]]
|
||||
then echo Skipping $bottle as it is a CX directory/file
|
||||
elif [[ "$bottle" = "$CXODIR/tie/" ]]
|
||||
then echo Skipping $bottle as it is a CX directory/file
|
||||
elif [[ "$bottle" = "$CXODIR/cxoffice.conf" ]]
|
||||
then echo Skipping $bottle as it is a CX directory/file
|
||||
elif [[ "$bottle" = "$CXODIR/usage.log" ]]
|
||||
then echo Skipping $bottle as it is a CX directory/file
|
||||
else {
|
||||
echo Archiving $bottle
|
||||
/opt/cxoffice/bin/cxbottle --bottle "$bottle" --tar "${bottle%/}.cxarchive"
|
||||
mv "${bottle%/}.cxarchive" "$CXOBACKUPDIR"
|
||||
echo Archival of $bottle completed and moved to $CXOBACKUPDIR
|
||||
}
|
||||
fi
|
||||
done
|
49
gaming/git_updatewowrepos.sh
Executable file
49
gaming/git_updatewowrepos.sh
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
RETAIL="/home/andrew/Games/wine/blizzard_games/World of Warcraft/_retail_/Interface/AddOns"
|
||||
CLASSIC="/home/andrew/Games/wine/blizzard_games/World of Warcraft/_classic_/Interface/AddOns"
|
||||
CLASSIC_ERA="/home/andrew/Games/wine/blizzard_games/World of Warcraft/_classic_era_/Interface/AddOns"
|
||||
|
||||
echo $RETAIL
|
||||
echo $CLASSIC
|
||||
echo $CLASSIC_ERA
|
||||
|
||||
func_DONE () {
|
||||
|
||||
tput cuu1
|
||||
tput cuf 40
|
||||
tput rev
|
||||
tput smso
|
||||
tput bold
|
||||
#tput setb 42
|
||||
#tput setf 30
|
||||
echo "DONE"
|
||||
tput sgr0
|
||||
}
|
||||
|
||||
echo "Updating Retail addons git repo"
|
||||
{
|
||||
cd "$RETAIL"
|
||||
git add .
|
||||
git commit -m "Updated addons."
|
||||
git push
|
||||
} &> /dev/null
|
||||
func_DONE
|
||||
|
||||
echo "Updating Classic addons git repo"
|
||||
{
|
||||
cd "$CLASSIC"
|
||||
git add .
|
||||
git commit -m "Updated addons."
|
||||
git push
|
||||
} &> /dev/null
|
||||
func_DONE
|
||||
|
||||
echo "Updating Classic Era addons git repo"
|
||||
{
|
||||
cd "$CLASSIC_ERA"
|
||||
git add .
|
||||
git commit -m "Updated addons."
|
||||
git push
|
||||
} &> /dev/null
|
||||
func_DONE
|
Loading…
Add table
Add a link
Reference in a new issue