source: asadb/util/diff_static_data.sh

space-accessstablestage
Last change on this file was 3c1b20b, checked in by Alex Dehnert <adehnert@…>, 12 years ago

Merge branch 'master' into space-access

  • master: (43 commits) Color NGEs differently from inactive groups Don't add NGEs to asa-official (ASA-#231) Take is_active out of str(GroupStatus?) (ASA-#230) Add group status to account lookup (ASA-#203) Add help text about Athena lockername selection Sort the "Update people" page (partial ASA-#232) Sort the signatories page (partial ASA-#232) Sort the officers of a group (partial ASA-#232) Validate P/T usernames in group creation form Remove spurious slash in new group email (ASA-#217) Use absolute path to templates (ASA-#211) Show group status on the non-student officers page Prevent 500'ing while uploading midway assignments "Upload table assignments" link (ASA-#225) Add midway tab Add midway list page (ASA-#226) Handle duplicate groups Fix spelling of midway permission Add the midway permissions to the asa-ebm group Allow running diff_static_data from any directory ...

Conflicts:

asadb/space/admin.py

  • Property mode set to 100755
File size: 995 bytes
Line 
1#!/bin/bash -e
2
3author="$USER diff_static_data.sh on $(hostname) <asa-db@mit.edu>"
4
5date
6
7cd "$(dirname "$0")/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.