Created
February 28, 2020 02:46
-
-
Save norcalli/8f5877b15c98ede0e9a0781fb04f73ad to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env fish | |
set CORE_FILE (newest-file.c core.nvim.\*) | |
set NVIM_BINARY (which nvim) | |
function make_report | |
uname -srvm | |
echo | |
nvim --version | |
echo | |
printf "%s\n" "bt full" (printf "frame %d\n" (seq 20)) | gdb --core=$CORE_FILE $NVIM_BINARY 2>&1 | |
end | |
set COREDUMP_LOG nvim-coredump-(date +%s).txt | |
set COREDUMP_TAR nvim-coredump-(date +%s).tgz | |
make_report > $COREDUMP_LOG | |
tar czf $COREDUMP_TAR $NVIM_BINARY $COREDUMP_LOG $CORE_FILE | |
set URL (kiani-static-upload $COREDUMP_TAR) | |
echo $URL | |
echo $URL >> $COREDUMP_LOG | |
ssh ashkan@10.0.0.2 "gist -d 'neovim automatic coredump upload. binary and core file uploaded to $URL' -f '$COREDUMP_LOG' -p" <$COREDUMP_LOG | |
rm $COREDUMP_LOG | |
rm $COREDUMP_TAR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment