Bug 103647
| Summary: | ccm-profile should be a function instead of an alias | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Web Application Framework | Reporter: | Dennis Gregorovic <dgregor> |
| Component: | dev environment | Assignee: | Dennis Gregorovic <dgregor> |
| Status: | CLOSED WONTFIX | QA Contact: | Jon Orris <jorris> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | nightly | CC: | mbooth |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-12-22 15:54:36 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
closing out old CCM bugs |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030716 Description of problem: From: Matthew Booth <mbooth> To: Dennis Gregorovic <dgregor> Subject: Patch to ccm-devel.sh Date: 01 Sep 2003 12:11:10 +0100 The attached patch makes ccm-profile into a function and exports it. It pulls the entire contents of /usr/bin/ccm-devel-profile.sh into /etc/profile.d/ccm-devel.sh, hence removing the need for this file to exist. My motivation for doing this is that I noticed when using screen I had to manually source /etc/profile in order for ccm-profile to work. As an alias it is set in the current shell, but is not exported to subprocesses. A function can be exported. --- /root/ccm-devel.sh Mon Sep 1 11:59:18 2003 +++ /etc/profile.d/ccm-devel.sh Mon Sep 1 12:05:12 2003 @@ -9,7 +9,36 @@ export CCM_DEVEL_ROOT export CCM_RPM_DIR -alias ccm-profile='. ccm-devel-profile.sh' +ccm-profile() { + if [ -z $1 ]; then + echo "ccm-devel-profile.sh <servername>" + return + fi + + if [ -z $CCM_DEVEL_CONF_DIR ]; then + echo "CCM_DEVEL_CONF_DIR not set" + return + fi + + . $CCM_DEVEL_CONF_DIR/project.sh + + for i in $CCM_DEVEL_CONF_DIR/project.d/*.sh + do + if [ -x $i ] + then + . $i + fi + done + + # "$CCM_HOME/project.sh" allows the user to set environment variables or + # perform other actions on a per-project basis. + + if [ -x "$CCM_HOME/project.sh" ]; then + . "$CCM_HOME/project.sh" + fi +} + +export -f ccm-profile # Set up ccm-profile completion # In order for this to work, we must be on a GNU/Linux OS running Bash >= 2.04 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.run build system under screen 2. 3. Actual Results: ccm-profile doesn't work Expected Results: ccm-profile works Additional info: