source: asadb/util/diff_static_data.sh @ 1927d79

space-accessstablestage
Last change on this file since 1927d79 was e2ceffa, checked in by Alex Dehnert <adehnert@…>, 13 years ago

Add list of lock types and assign them to rooms

  • Property mode set to 100755
File size: 977 bytes
Line 
1#!/bin/bash -e
2
3author="$USER diff_static_data.sh on $(hostname) <asa-db@mit.edu>"
4
5date
6
7cd static-data
8
9../dump_group_perms.py > group-perms.py
10git add group-perms.py
11
12../../manage.py dumpdata --format=xml --indent=4 groups.ActivityCategory > groups_initial_data.xml
13../../manage.py dumpdata --format=xml --indent=4 forms.FYSMCategory > forms_initial_data.xml
14../../manage.py dumpdata --format=xml --indent=4 space.LockType --format=xml --indent=4 > space_lock_types.xml
15git add {groups,forms}_initial_data.xml space_lock_types.xml
16
17echo
18echo Committing current static data:
19set +e
20git commit -m "Updated static data: $(date +%F)" --author="$author"
21commit_result="$?"
22set -e
23
24if [ "$commit_result" = "0" ]; then
25    echo
26    echo Changes in this commit:
27    git show
28else
29    echo "(No changes made.)"
30fi
31
32echo
33echo
34echo Disk usage:
35du -h --max-depth=1
36
37echo
38echo "gc'ing..."
39time git gc
40echo "repack'ing..."
41time git repack
42
43echo
44echo Disk usage:
45du -h --max-depth=1
46
47date
Note: See TracBrowser for help on using the repository browser.