1 denise.eckstein 1.3 # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec
2 # install remove upgrade reinstall
3 # pre 1 - 2 2
4 #
5 # If it exists, the active OpenPegasus Repository
6 # directory, %PEGASUS_REPOSITORY_DIR is renamed
7 # to %PEGASUS_PREV_REPOSITORY_DIR. If
8 # %PEGASUS_PREV_REPOSITORY_DIR already exists,
9 # it is saved as an archive file.
10
11 if [ -d %PEGASUS_REPOSITORY_DIR"/root#PG_Internal" ]; then
12 #
13 # Save the current repository to prev_repository
14 #
15 if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then
16 /bin/tar -C %PEGASUS_REPOSITORY_PARENT_DIR -cf \
17 %PEGASUS_PREV_REPOSITORY_DIR`date '+%Y-%m-%d-%s.%N'`.tar \
18 %PEGASUS_PREV_REPOSITORY_DIR_NAME
19 rm -rf %PEGASUS_PREV_REPOSITORY_DIR
20 fi
21 /bin/mv %PEGASUS_REPOSITORY_DIR %PEGASUS_PREV_REPOSITORY_DIR
|