Permalink
Browse files

Merge branch 'master' of github.com:sm/sm

  • Loading branch information...
2 parents 9a1cefa + 7290d80 commit 56e1ef49410289d9797d84581eb28cc57394fdc3 @mpapis mpapis committed Aug 1, 2013
Showing with 14 additions and 3 deletions.
  1. +3 −3 core/internal/shell/package/strategies/gnu/functions
  2. +11 −0 core/internal/shell/process/functions
@@ -210,9 +210,9 @@ __sm.package.fetch.checksum()
${curl} -L "${download_url}" -o "${archives_path}/${package_file}.checksum" 2>/dev/null || return 1
fi
- package_checksum=$(cat "${archives_path}/${package_file}.checksum")
-
- if [[ -f "${archives_path}/${package_file}.checksum" ]]
+ if [[ -s "${archives_path}/${package_file}.checksum" ]]
+ then package_checksum=$(cat "${archives_path}/${package_file}.checksum")
+ elif [[ -f "${archives_path}/${package_file}.checksum" ]]
then rm "${archives_path}/${package_file}.checksum"
fi
@@ -7,6 +7,17 @@ __sm.process.status()
_name="$1"
_pid="$2"
+ case "${_pid}" in
+ ([0-9]+)
+ ;;
+ (*)
+ if [[ -n "${_pid}" && -f "${_pid}" ]]
+ then _pid=$(cat ${_pid})
+ else _pid=0
+ fi
+ ;;
+ esac
+
log "${name:-"process"}:"
if (( ${_pid} > 0 ))

0 comments on commit 56e1ef4

Please sign in to comment.