diff --git a/brew.sh b/brew.sh index a66bca84b..7fa331563 100755 --- a/brew.sh +++ b/brew.sh @@ -1,4 +1,4 @@ - #!/bin/bash +#!/bin/bash # Install command-line tools using Homebrew diff --git a/docs/clearing-disk-space.sh b/docs/clearing-disk-space.sh deleted file mode 100644 index 549fd87f7..000000000 --- a/docs/clearing-disk-space.sh +++ /dev/null @@ -1,41 +0,0 @@ -# won't last long but will give you 1G. -sudo rm /private/var/vm/sleepimage - -# Clean up system logs and temporary files -# http://www.thexlab.com/faqs/maintscripts.html -sudo periodic daily weekly monthly - - -# remove old homebrew versions -# https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md#how-do-i-uninstall-old-versions-of-a-formula -brew cleanup -n # to see what would get cleaned up -brew cleanup # to do it. - -cask cleanup - - -~/Library/Caches/Google/Chrome Canary/Default -~/Library/Caches/Google/Chrome/Default - - -# diskexplorer X is good for big files -# daisy disk is good for big folders - -# XCODE is enormous -# kill cache -rm -rf ~/Library/Caches/com.apple.dt.Xcode -# appears that XCode can survive deleting ALL documentation sets! -~/Library/Developer/Shared/Documentation/DocSets -/Applications/Xcode.app/Contents/Developer/Documentation/DocSets -# other simulators can be here. -/Library/Developer/CoreSimulator/Profiles/Runtimes - -# use appcleaner to remove weird shit - -emptytrash - -# investigate manually - https://dev.yorhel.nl/ncdu -ncdu ~ - -# really roll up those sleeves and get dirty -ncdu / diff --git a/docs/common-things.sh b/docs/common-things.sh index 43e9e42d7..e87baa701 100644 --- a/docs/common-things.sh +++ b/docs/common-things.sh @@ -1,7 +1,4 @@ -#!/bin/bash - - - +# shellcheck disable=2148 # listing all useragent from your logs @@ -56,9 +53,9 @@ rm $chromefilename # measuring time in fish shell: -set -l then (gdate +%s%N); -sleep 0.5; -set -l andnow (gdate +%s%N); echo cool (math ( math $andnow - $then) / 1000 / 1000 ) +# set -l earlier (gdate +%s%N); +# sleep 0.5; +# set -l andnow (gdate +%s%N); echo cool (math ( math $andnow - $earlier) / 1000 / 1000 ) diff --git a/docs/upsampling images.sh b/docs/upsampling images.sh index 238887e89..c383411a7 100644 --- a/docs/upsampling images.sh +++ b/docs/upsampling images.sh @@ -1,3 +1,5 @@ +# shellcheck disable=2148 + # basic convert image-filename.png -resize 300% image-filename.3x-basic.png diff --git a/setup-a-new-machine.sh b/setup-a-new-machine.sh index bbc515f58..bf0a773c1 100755 --- a/setup-a-new-machine.sh +++ b/setup-a-new-machine.sh @@ -1,5 +1,6 @@ # copy paste this file in bit by bit. # don't run it. +# shellcheck disable=2148 echo "do not run this script in one go. hit ctrl-c NOW" read -n 1 diff --git a/setup-chromium.sh b/setup-chromium.sh index a95c5e810..32601c59c 100644 --- a/setup-chromium.sh +++ b/setup-chromium.sh @@ -2,6 +2,7 @@ ## Chromium hacking # improve perf of git inside of chromium checkout +# shellcheck disable=2148 # Read https://chromium.googlesource.com/chromium/src/+/HEAD/docs/mac_build_instructions.md#improving-performance-of-git-commands # ... and do it all. diff --git a/symlink-setup.sh b/symlink-setup.sh index 4c211fb12..1f3fd75ff 100755 --- a/symlink-setup.sh +++ b/symlink-setup.sh @@ -159,7 +159,7 @@ main() { local sourceFile="" local targetFile="" - for i in ${FILES_TO_SYMLINK[@]}; do + for i in "${FILES_TO_SYMLINK[@]}"; do sourceFile="$(pwd)/$i" targetFile="$HOME/$(printf "%s" "$i" | sed "s/.*\/\(.*\)/\1/g")"