Skip to content

Commit

Permalink
Placed sm-mustache and sm-json code for install.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed May 4, 2012
1 parent 5d08ee4 commit 397d4cf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
2 changes: 0 additions & 2 deletions bin/sm-installer
Expand Up @@ -60,8 +60,6 @@ mkdir -p "${sm_path}/archives" "${sm_path}/bin" "${sm_path}/src/${sm_owner}-sm"

${sm_curl_command} https://smf.sh/zsh/$platform/zsh -o "${sm_path}/zsh/bin/zsh"
chmod +x "${sm_path}/zsh/bin/zsh"
${sm_curl_command} https://smf.sh/mustache/$platform/sm-mustache -o "${sm_path}/bin/sm-mustache"
chmod +x "${sm_path}/bin/sm-mustache"

${sm_curl_command} -L https://github.com/${sm_owner}/sm/tarball/master -o "${sm_path}/archives/${sm_owner}-sm.tar.gz"
cd "${sm_path}/src/${sm_owner}-sm"
Expand Down
32 changes: 32 additions & 0 deletions core/install/shell/functions
Expand Up @@ -216,6 +216,34 @@ create_versionedfs_paths()
path "${install_path}/exts" strategy name method copy activate first
}

install_sm_mustache()
{
typeset _url
if ! file is executable "${install_path}/bin/sm-mustache"
then
__sm.log.step "Downloading sm-mustache."
_url="https://smf.sh/mustache/$(uname -s)/$(uname -m)/sm-mustache"
curl -s ${_url} -o "${install_path}/bin/sm-mustache"
file chmod +x "${install_path}/bin/sm-mustache"
__sm.log.step success
fi
}

install_sm_json()
{
return 0 # Remove this line once sm-json is ready.

typeset _url
if ! file is executable "${install_path}/bin/sm-json"
then
__sm.log.step "Downloading sm-json"
_url="https://smf.sh/json/$(uname -s)/$(uname -m)/sm-json"
curl -s ${_url} -o "${install_path}/bin/sm-json"
file chmod +x "${install_path}/bin/sm-json"
__sm.log.step success
fi
}

install_sm()
{
log "S{cripting,ystem,tack} Management (SM) Framework (Core) Installation:"
Expand All @@ -224,6 +252,10 @@ install_sm()

perform install_core

perform install_sm_mustache

perform install_sm_json

perform create_versionedfs_paths

perform set_sm_path
Expand Down

0 comments on commit 397d4cf

Please sign in to comment.