-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
rows=$(tput lines) | ||
window_id=$(osascript -e 'tell app "iTerm" to id of window 1') | ||
window_id=$(osascript -e 'tell app "iTerm" to id of window 1') | ||
|
||
for theme in "$@" | ||
do | ||
npm run build:publish | ||
|
||
for theme in "$@"; do | ||
git config --replace-all split-diffs.theme-name "$theme" | ||
clear | ||
git --no-pager show 5a00d16095a255b57c762289fa434e18088b956b src/iterSideBySideDiffs.ts | ./bin/git-split-diffs --color | head -n $(($rows-1)) | ||
screencapture -x -T 1 -l $window_id "screenshots/$theme.png" | ||
git --no-pager show 5a00d16095a255b57c762289fa434e18088b956b src/iterSideBySideDiffs.ts | node ./build/index.mjs --color | head -n $((rows - 1)) | ||
screencapture -x -T 1 -l "$window_id" "screenshots/$theme.png" | ||
open -a ImageOptim "screenshots/$theme.png" | ||
done | ||
|
||
git config --unset split-diffs.theme-name | ||
|