aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/gitAR.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gitAR.sh')
-rwxr-xr-xscripts/gitAR.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/scripts/gitAR.sh b/scripts/gitAR.sh
index 25cab48..bbcc761 100755
--- a/scripts/gitAR.sh
+++ b/scripts/gitAR.sh
@@ -51,18 +51,25 @@ cat >.gitattributes <<- zzzzEOFzzzz
51*.r32 -delta -diff -text 51*.r32 -delta -diff -text
52*.tga -delta -diff -text 52*.tga -delta -diff -text
53zzzzEOFzzzz 53zzzzEOFzzzz
54git add .gitattributes &>>../log
55# Coz git insists. 54# Coz git insists.
56git config user.email "opensim@$(hostname -A | cut -d ' ' -f 1)" 55git config user.email "opensim@$(hostname -A | cut -d ' ' -f 1)"
57git config user.name "opensim" 56git config user.name "opensim"
58 57
58# Git is such a pedantic bitch, let's just fucking ignore any errors it gives due to lack of anything to do.
59# Even worse the OpenSim devs breaking logout tracking gives git plenty of nothing to do. lol
60
59# Looping through them in case there's a bunch of I/OARs from previous versions of this script. 61# Looping through them in case there's a bunch of I/OARs from previous versions of this script.
60find ../.. -maxdepth 1 -type f -name ${name}-*.${type}ar | sort | while read file; do 62# Ignore files of zero size that OpenSim might create.
63find ../.. -maxdepth 1 -type f -name "${name}-*.${type}ar" -size '+0c' | sort | while read file; do
61 # Deal with deletions in the inventory / sim, easy method, which becomes a nop for files that stay in the git add below. 64 # Deal with deletions in the inventory / sim, easy method, which becomes a nop for files that stay in the git add below.
62 git rm -fr * &>>../log && \ 65 git rm -fr * &>>../log #|| echo "ERROR - Could not clean git for ${file} !" >>../errors
63 nice -n 19 tar -xzf "${file}" || echo "ERROR - Could not unpack ${file} !" >>../errors 66 if [ ! -f ../errors ]; then
67 nice -n 19 tar -xzf "${file}" || echo "ERROR - Could not unpack ${file} !" >>../errors
68 fi
64 if [ ! -f ../errors ]; then 69 if [ ! -f ../errors ]; then
65 git add * &>>../log && git add */\* &>>../log 70 git add * &>>../log
71 git add */\* &>>../log #|| echo "ERROR - Could not add ${file} to git!" >>../errors
72 git add .gitattributes &>>../log
66 # Magic needed to figure out if there's anything to commit. 73 # Magic needed to figure out if there's anything to commit.
67 # After all the pain to get this to work, there's an ever changing timestamp in archive.xml that screws it up. 74 # After all the pain to get this to work, there's an ever changing timestamp in archive.xml that screws it up.
68 # Like this system didn't have enough timestamps in it already. lol 75 # Like this system didn't have enough timestamps in it already. lol
@@ -99,5 +106,3 @@ if [ -f ${PRGDIR}/../../backups/temp_backup${type}_${name}/errors ]; then
99else 106else
100 rm -fr ${PRGDIR}/../../backups/temp_backup${type}_${name} 107 rm -fr ${PRGDIR}/../../backups/temp_backup${type}_${name}
101fi 108fi
102
103echo -n ${name}