Created
November 5, 2013 09:28
-
-
Save phunehehe/7316281 to your computer and use it in GitHub Desktop.
Manage Chef modules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name;/path/to/name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
bin_dir="$(cd "$(dirname "$0")" && pwd)" | |
while read module | |
do | |
orig_path="${module#*;}" | |
link_path="$bin_dir/site-cookbooks/${module%;*}" | |
mkdir -p "$link_path" | |
[[ "$(ls -A "$link_path")" ]] && sudo umount "$link_path" | |
sudo mount --bind "$orig_path" "$link_path" | |
done < "$bin_dir/modules" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
bin_dir="$(cd "$(dirname "$0")" && pwd)" | |
while read module | |
do | |
link_path="$bin_dir/site-cookbooks/${module%;*}" | |
mkdir -p "$link_path" | |
[[ "$(ls -A "$link_path")" ]] && sudo umount "$link_path" | |
done < "$bin_dir/modules" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment