- Timestamp:
- Dec 3, 2010, 4:24:59 PM (14 years ago)
- Location:
- dasscm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
dasscm/trunk/dasscm.spec
r928 r932 53 53 install -m 755 usr/bin/dasscm $RPM_BUILD_ROOT/usr/bin/ 54 54 install -m 755 usr/bin/dasscm_remote_update.sh $RPM_BUILD_ROOT/usr/bin/ 55 mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/ 56 mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/plugin-results/ 57 55 58 mkdir -p $RPM_BUILD_ROOT/etc/ 56 59 install -m 640 etc/dasscm.conf $RPM_BUILD_ROOT/etc/ 57 mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/ 58 mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/plugin-results/ 60 mkdir -p $RPM_BUILD_ROOT/etc/profile.d/ 61 install -m 644 etc/profile.d/dasscm.sh $RPM_BUILD_ROOT/etc/profile.d/ 62 59 63 %if %(test -d /etc/bash_completion.d/ && echo 1 || echo 0) 60 64 %define use_bash_completion 1 -
dasscm/trunk/etc/dasscm.conf
r925 r932 32 32 #DASSCM_CHECKOUT_USERNAME=dasscm 33 33 #DASSCM_CHECKOUT_PASSWORD= 34 35 # 36 # evaluated by /etc/profile.d/dasscm.sh 37 # If set to "yes", 38 # a "dasscm status" is executed during shell login 39 # 40 DASSCM_STATUS_AT_SHELL_LOGIN="yes" 34 41 35 42 # -
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.