Skip to content

Instantly share code, notes, and snippets.

@phunehehe phunehehe/modules
Created Nov 5, 2013

Embed
What would you like to do?
Manage Chef modules
name;/path/to/name
#!/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"
#!/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
You can’t perform that action at this time.