Changeset 932 for dasscm/trunk/etc/profile.d
- Timestamp:
- Dec 3, 2010, 4:24:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dasscm/trunk/etc/profile.d/dasscm.sh
r777 r932 1 1 #!/bin/sh 2 2 3 if [ `whoami` = "root" ]; then 4 if ! dasscm check > /dev/null; then 5 printf "* DASSCM warnings *\n" 6 dasscm status 7 printf "* please check-in these changes first *\n" 8 fi 3 CONFIG="/etc/dasscm.conf" 4 5 if [ -r $CONFIG ]; then 6 source $CONFIG 7 8 # check if a warn message is wanted 9 # and dasscm is already configured ($DASSCM_REPOSITORY_NAME) 10 if [ "$DASSCM_STATUS_AT_SHELL_LOGIN" = "yes" -a -n "$DASSCM_REPOSITORY_NAME" ]; then 11 12 # check if write permissions are given 13 if [ -w "${DASSCM_LOCAL_REPOSITORY_BASE}/${DASSCM_REPOSITORY_NAME}" ]; then 14 15 # get dasscm status 16 # and print it, if a result is given 17 RESULT=`dasscm status` 18 if [ $? -ne 0 ]; then 19 printf "* DASSCM warnings *\n" 20 printf "$RESULT\n" 21 printf "* please use dasscm to check-in these changes *\n" 22 fi 23 fi 24 fi 9 25 fi 10 11 # TODO: check configured12 # alternative for non-root: X=`echo | sudo -S dasscm check`
Note:
See TracChangeset
for help on using the changeset viewer.