diff --git a/bin/bootstrap-caskroom b/bin/bootstrap-caskroom index 5eccd4b..107d0da 100755 --- a/bin/bootstrap-caskroom +++ b/bin/bootstrap-caskroom @@ -5,7 +5,6 @@ set -e PACKAGE_LIST_CMD="brew cask list" PACKAGE_INSTALL_CMD="brew cask install" - # # Package list # @@ -136,7 +135,6 @@ PERSONAL_PKGS=( yakyak ) - # # Main # @@ -155,7 +153,6 @@ main() { fi } - # # The rest... # diff --git a/bin/bootstrap-homebrew b/bin/bootstrap-homebrew index 258b174..a769b35 100755 --- a/bin/bootstrap-homebrew +++ b/bin/bootstrap-homebrew @@ -5,7 +5,6 @@ set -e PACKAGE_LIST_CMD="brew list" PACKAGE_INSTALL_CMD="brew install" - # # Package list # @@ -63,7 +62,6 @@ PERSONAL_PKGS=( "mkvtoolnix --with-qt" ) - # # Main # @@ -78,7 +76,6 @@ main() { fi } - # # The rest... # diff --git a/bin/create-chrome-ssb b/bin/create-chrome-ssb index 52dc92e..3396c36 100755 --- a/bin/create-chrome-ssb +++ b/bin/create-chrome-ssb @@ -15,7 +15,7 @@ icon="$3" if [ -z "$name" ] || [ -z "$url" ]; then echo 'usage: create-chrome-ssb "Google Music"' \ - '"https://play.google.com/music"' + '"https://play.google.com/music"' exit 1 fi @@ -31,11 +31,10 @@ if [ -d "$app_path" ]; then exit 1 fi - # Various paths used when creating the app. resource_dir="${app_path}/Contents/Resources" exec_dir="${app_path}/Contents/MacOS" -exec_file="${exec_dir}/${name//[[:space:]]}" +exec_file="${exec_dir}/${name//[[:space:]]/}" plist_file="${app_path}/Contents/Info.plist" app_support="\${HOME}/Library/Application Support" @@ -46,10 +45,10 @@ bundle_identifier="me.jimeh.chrome-ssb.${name}" mkdir -p "$resource_dir" "$exec_dir" # convert the icon and copy into Resources -if [ -f "$icon" ] ; then +if [ -f "$icon" ]; then sips -s format tiff "$icon" \ - --out "${resource_dir}/icon.tiff" \ - --resampleWidth 128 >& /dev/null + --out "${resource_dir}/icon.tiff" \ + --resampleWidth 128 >&/dev/null tiff2icns -noLarge "${resource_dir}/icon.tiff" >&/dev/null if [ -f "${resource_dir}/icon.tiff" ]; then @@ -58,7 +57,7 @@ if [ -f "$icon" ] ; then fi # Create the executable. -cat > "$exec_file" < "$exec_file" << EOF #!/bin/sh mkdir -p "${profile_dir}" exec "${chrome_path}" \\ @@ -70,7 +69,7 @@ EOF chmod +x "$exec_file" # Create the Info.plist. -cat > "$plist_file" < "$plist_file" << EOF diff --git a/bin/docker-volume-backup b/bin/docker-volume-backup index 817405b..61764d4 100755 --- a/bin/docker-volume-backup +++ b/bin/docker-volume-backup @@ -1,13 +1,13 @@ #! /usr/bin/env bash set -e -abs_dirname () { +abs_dirname() { local path="$1" local cwd cwd="$(pwd)" while [ -n "$path" ]; do - cd "${path%/*}" 2>/dev/null + cd "${path%/*}" 2> /dev/null local name="${path##*/}" path="$(resolve_link "$name" || true)" done @@ -16,16 +16,16 @@ abs_dirname () { cd "$cwd" } -abs_path () { +abs_path() { local path="$1" echo "$(cd "$(abs_dirname "$path")" && pwd)/$(basename "$path")" } -resolve_link () { +resolve_link() { $(type -p greadlink readlink | head -1) "$1" } -resolve_dest () { +resolve_dest() { local dest="$1" if [ -z "$dest" ]; then @@ -42,7 +42,7 @@ resolve_dest () { echo "$dest" } -resolve_dest_dir () { +resolve_dest_dir() { local dest="$1" local dir @@ -55,7 +55,7 @@ resolve_dest_dir () { echo "$dir" } -help () { +help() { echo "usage: docker-volume-backup []" echo "" echo "Backs up contents of a Docker volume to a gzipped tar archive." @@ -66,7 +66,7 @@ help () { echo " Defaults to: ./__