Updates
This commit is contained in:
parent
00e919f7f5
commit
58f6626280
16 changed files with 90 additions and 367 deletions
|
@ -1,19 +1,31 @@
|
|||
font_family Iosevka Term
|
||||
bold_font Iosevka Term Bold
|
||||
italic_font Iosevka Term Italic
|
||||
bold_italic_font Iosevka Term Bold Italic
|
||||
font_family iosevka-lyte
|
||||
|
||||
repaint_delay 5
|
||||
input_delay 1
|
||||
sync_to_monitor no
|
||||
|
||||
font_features iosevka-lyte -liga -dlig -calt
|
||||
|
||||
font_size 11.0
|
||||
adjust_line_height 0
|
||||
window_padding_width 5.0
|
||||
window_margin_width 0.0
|
||||
|
||||
enable_audio_bell no
|
||||
map ctrl+shift+equal change_font_size all +0.5
|
||||
map ctrl+shift+minus change_font_size all -0.5
|
||||
|
||||
enable_audio_bell yes
|
||||
|
||||
# TODO: generate via color scheme generator
|
||||
background #111111
|
||||
foreground #f8f8f2
|
||||
|
||||
url_style curly
|
||||
|
||||
# https://google.com
|
||||
|
||||
strip_trailing_spaces smart
|
||||
|
||||
color0 #111111
|
||||
color1 #f92672
|
||||
color2 #a6e22e
|
||||
|
@ -23,6 +35,7 @@ color5 #ae81ff
|
|||
color6 #a1efe4
|
||||
color7 #f8f8f2
|
||||
|
||||
# TODO: where did these colors come from? donokai?
|
||||
color8 #75715e
|
||||
color9 #fd971f
|
||||
color10 #383830
|
||||
|
|
|
@ -1,19 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
# vim:fdm=marker
|
||||
#
|
||||
# Neofetch config file
|
||||
# https://github.com/dylanaraps/neofetch
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Speed up script by not using unicode
|
||||
export LC_ALL=C
|
||||
export LANG=C
|
||||
|
||||
# Info Options {{{
|
||||
|
||||
|
||||
# Info
|
||||
# See this wiki page for more info:
|
||||
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
|
||||
print_info() {
|
||||
info line_break
|
||||
|
||||
|
@ -45,375 +34,86 @@ print_info() {
|
|||
wait
|
||||
}
|
||||
|
||||
|
||||
# Kernel
|
||||
|
||||
# Show more kernel info
|
||||
# --kernel_shorthand on, off
|
||||
kernel="off"
|
||||
kernel_shorthand="on"
|
||||
|
||||
|
||||
# Distro
|
||||
|
||||
# Shorten the output of distro (tiny, on, off)
|
||||
# NOTE: This is only possible on Linux, macOS, and Solaris
|
||||
distro_shorthand="off"
|
||||
|
||||
# Show 'x86_64' and 'x86' in 'Distro:' output.
|
||||
# --os_arch on, off
|
||||
os_arch="on"
|
||||
|
||||
|
||||
# Uptime
|
||||
|
||||
# Shorten the output of the uptime function
|
||||
# --uptime_shorthand tiny, on, off
|
||||
uptime_shorthand="off"
|
||||
|
||||
|
||||
# Shell
|
||||
|
||||
# Show the path to $SHELL
|
||||
# --shell_path on, off
|
||||
shell_path="off"
|
||||
|
||||
# Show $SHELL's version
|
||||
# --shell_version on, off
|
||||
shell_version="on"
|
||||
|
||||
|
||||
# CPU
|
||||
|
||||
# CPU speed type
|
||||
# Only works on Linux with cpufreq.
|
||||
# --speed_type current, min, max, bios,
|
||||
# scaling_current, scaling_min, scaling_max
|
||||
speed_type="max"
|
||||
|
||||
# CPU Shorthand
|
||||
# Set shorthand setting
|
||||
# --cpu_shorthand name, speed, tiny, on, off
|
||||
cpu_shorthand="off"
|
||||
|
||||
# CPU Usage display
|
||||
# Set CPU usage display setting
|
||||
# --cpu_display bar, infobar, barinfo, off
|
||||
cpu_display="off"
|
||||
|
||||
# CPU Speed
|
||||
# Hide/Show CPU speed.
|
||||
# --cpu_speed on, off
|
||||
cpu_speed="on"
|
||||
|
||||
# CPU Cores
|
||||
# Display CPU cores in output
|
||||
# Logical: All virtual cores
|
||||
# Physical: All physical cores
|
||||
# --cpu_cores logical, physical, off
|
||||
# Note: 'physical' doesn't work on BSD.
|
||||
cpu_cores="logical"
|
||||
|
||||
# CPU Temperature
|
||||
# Hide/Show CPU temperature.
|
||||
# --cpu_temp on, off
|
||||
# Note: Only works on Linux.
|
||||
cpu_temp="off"
|
||||
|
||||
|
||||
# GPU
|
||||
|
||||
# Enable/Disable GPU Brand
|
||||
# --gpu_brand on, off
|
||||
gpu_brand="on"
|
||||
|
||||
|
||||
# Resolution
|
||||
|
||||
# Display refresh rate next to each monitor
|
||||
# Unsupported on Windows
|
||||
# --refresh_rate on, off
|
||||
refresh_rate="off"
|
||||
|
||||
|
||||
# Gtk Theme / Icons
|
||||
|
||||
# Shorten output (Hide [GTK2] etc)
|
||||
# --gtk_shorthand on, off
|
||||
gtk_shorthand="off"
|
||||
|
||||
|
||||
# Enable/Disable gtk2 theme/icons output
|
||||
# --gtk2 on, off
|
||||
gtk2="on"
|
||||
|
||||
# Enable/Disable gtk3 theme/icons output
|
||||
# --gtk3 on, off
|
||||
gtk3="on"
|
||||
|
||||
|
||||
# IP Address
|
||||
|
||||
# Website to ping for the public IP
|
||||
# --ip_host url
|
||||
public_ip_host="http://ident.me"
|
||||
|
||||
|
||||
# Song
|
||||
|
||||
# Print the Artist and Title on seperate lines
|
||||
# --song_shorthand on, off
|
||||
song_shorthand="off"
|
||||
|
||||
|
||||
# Birthday
|
||||
|
||||
# Whether to show a long pretty output
|
||||
# or a shortened one
|
||||
# NOTE: Long pretty output doesn't work on OpenBSD or NetBSD.
|
||||
# --birthday_shorthand on, off
|
||||
birthday_shorthand="off"
|
||||
|
||||
# Whether to show the time in the output
|
||||
# --birthday_time on, off
|
||||
birthday_time="on"
|
||||
|
||||
# Date format to use when printing birthday
|
||||
# --birthday_format "format"
|
||||
birthday_format="+%a %d %b %Y %l:%M %p"
|
||||
|
||||
|
||||
# }}}
|
||||
|
||||
# Text Colors {{{
|
||||
|
||||
|
||||
# Text Colors
|
||||
# Each number represents a different part of
|
||||
# the text in this order:
|
||||
# title, @, underline, subtitle, colon, info
|
||||
# colors=(4 6 1 8 8 6)
|
||||
# You can also specify:
|
||||
# fg (foreground color)
|
||||
colors=(distro)
|
||||
|
||||
|
||||
# }}}
|
||||
|
||||
# Text Options {{{
|
||||
|
||||
|
||||
# Toggle bold text
|
||||
# --bold on, off
|
||||
bold="on"
|
||||
|
||||
# Enable/Disable Underline
|
||||
# --underline on, off
|
||||
underline_enabled="on"
|
||||
|
||||
# Underline character
|
||||
# --underline_char char
|
||||
underline_char="-"
|
||||
|
||||
|
||||
# }}}
|
||||
|
||||
# Color Blocks {{{
|
||||
|
||||
|
||||
# Color block range
|
||||
# --block_range start end
|
||||
# block_range="0,15"
|
||||
|
||||
# Toggle color blocks
|
||||
# --color_blocks on, off
|
||||
color_blocks="on"
|
||||
|
||||
# Color block width in spaces
|
||||
# --block_width num
|
||||
block_width=5
|
||||
|
||||
# Color block height in lines
|
||||
# --block_height num
|
||||
block_height=2
|
||||
|
||||
|
||||
# }}}
|
||||
|
||||
# Progress Bars {{{
|
||||
|
||||
|
||||
# Progress bar character
|
||||
# --progress_char elapsed_char total_char
|
||||
progress_char_elapsed="-"
|
||||
progress_char_total="="
|
||||
|
||||
# Progress border
|
||||
# --progress_border on, off
|
||||
progress_border="on"
|
||||
|
||||
# Progress bar length in spaces
|
||||
# Number of chars long to make the progress bars.
|
||||
# --progress_length num
|
||||
progress_length="15"
|
||||
|
||||
# Progress bar colors
|
||||
# When set to distro, uses your distro's logo colors
|
||||
# Takes: num, "distro"
|
||||
# --progress_colors col col
|
||||
progress_color_elapsed="distro"
|
||||
progress_color_total="distro"
|
||||
|
||||
# Customize how the info is displayed.
|
||||
# bar: Only the progress bar is displayed.
|
||||
# infobar: The bar is displayed after the info.
|
||||
# barinfo: The bar is displayed before the info.
|
||||
# off: Only the info is displayed.
|
||||
#
|
||||
# --memory_display bar, infobar, barinfo, off
|
||||
# --battery_display bar, infobar, barinfo, off
|
||||
# --disk_display bar, infobar, barinfo, off
|
||||
memory_display="off"
|
||||
battery_display="off"
|
||||
disk_display="on"
|
||||
|
||||
backend="kitty"
|
||||
image_backend="kitty"
|
||||
|
||||
# }}}
|
||||
|
||||
# Image Options {{{
|
||||
|
||||
backend="w3m"
|
||||
image_backend="w3m"
|
||||
|
||||
# Image Source
|
||||
# --image wall, ascii, /path/to/img, /path/to/dir/, off
|
||||
image="~/.wallpaper"
|
||||
|
||||
# Thumbnail directory
|
||||
thumbnail_dir="$HOME/.cache/thumbnails/neofetch"
|
||||
|
||||
# W3m-img path
|
||||
# Only works with the w3m backend.
|
||||
# Some systems have this in another location
|
||||
w3m_img_path="/usr/lib/w3m/w3mimgdisplay"
|
||||
|
||||
# Crop mode
|
||||
# --crop_mode normal, fit, fill
|
||||
crop_mode="normal"
|
||||
|
||||
# Crop offset
|
||||
# Only affects normal mode.
|
||||
# --crop_offset northwest, north, northeast, west, center
|
||||
# east, southwest, south, southeast
|
||||
crop_offset="center"
|
||||
|
||||
# Image size
|
||||
# The image is half the terminal width by default.
|
||||
# --size auto, 00px, 00%, none
|
||||
image_size="360px"
|
||||
|
||||
# Right gap between image and text
|
||||
# --gap num
|
||||
gap=1
|
||||
|
||||
# Image offsets
|
||||
# Only works with the w3m backend.
|
||||
# --xoffset px
|
||||
# --yoffset px
|
||||
yoffset=0
|
||||
xoffset=0
|
||||
|
||||
# Image background color
|
||||
# Only works with the w3m backend.
|
||||
# Unset by default.
|
||||
# --bg_color 'color', blue
|
||||
background_color=
|
||||
|
||||
|
||||
# }}}
|
||||
|
||||
# Ascii Options {{{
|
||||
|
||||
|
||||
# Default ascii image to use
|
||||
# When this is set to distro it will use your
|
||||
# distro's logo as the ascii.
|
||||
# --ascii 'distro', path/to/ascii
|
||||
ascii="distro"
|
||||
|
||||
# Ascii distro
|
||||
# Which distro's ascii art to display.
|
||||
# --ascii_distro 'auto', 'distro_name'
|
||||
ascii_distro="auto"
|
||||
|
||||
# Ascii colors
|
||||
# When this is set to distro it will use your
|
||||
# ditro's colors to color the ascii.
|
||||
# NOTE: You can also set this to a range of colors
|
||||
# which will allow you to custom color distro logos
|
||||
# --ascii_colors distro
|
||||
# --ascii_colors 2 4 5 6
|
||||
ascii_colors=(distro)
|
||||
|
||||
# Logo size
|
||||
# Arch, Crux and Gentoo have a smaller logo
|
||||
# variant. Changing the value below to small
|
||||
# will make neofetch use the small logo.
|
||||
# --ascii_logo_size small, normal
|
||||
ascii_logo_size="normal"
|
||||
|
||||
# Bold ascii logo
|
||||
# Whether or not to bold the ascii logo.
|
||||
# --ascii_bold on, off
|
||||
ascii_bold="on"
|
||||
|
||||
|
||||
# }}}
|
||||
|
||||
# Scrot Options {{{
|
||||
|
||||
|
||||
# Whether or not to always take a screenshot
|
||||
# You can manually take a screenshot with "--scrot" or "-s"
|
||||
scrot="off"
|
||||
|
||||
# Screenshot program to launch
|
||||
# --scrot_cmd
|
||||
scrot_cmd="scrot -c -d 3"
|
||||
|
||||
# Scrot dir
|
||||
# Where to save the screenshots
|
||||
# --scrot_dir /path/to/screenshot/folder
|
||||
scrot_dir="$NICE_HOME/img/"
|
||||
|
||||
# Scrot filename
|
||||
# What to name the screenshots
|
||||
# --scrot_name str
|
||||
scrot_dir="$XDG_PICTURES_DIR"
|
||||
scrot_name="neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png"
|
||||
|
||||
# Image upload host
|
||||
# Where to upload the image.
|
||||
# Possible values: imgur, teknik
|
||||
image_host="imgur"
|
||||
|
||||
# Imgur api key
|
||||
# This is an api key for neofetch, you can sign up for your own
|
||||
# here: http://api.imgur.com/oauth2/addclient
|
||||
imgur_client_id="0e8b44d15e9fc95"
|
||||
|
||||
|
||||
# }}}
|
||||
|
||||
# Config Options {{{
|
||||
|
||||
|
||||
# Enable/Disable config file
|
||||
# --config off, none
|
||||
config="on"
|
||||
|
||||
# Path to custom config file location
|
||||
# --config path/to/config
|
||||
config_file="${XDG_CONFIG_HOME:-${HOME}/.config}/neofetch/config"
|
||||
|
||||
|
||||
# }}}
|
||||
|
|
|
@ -222,15 +222,15 @@ nnoremap <leader>gs :syntax sync fromstart<CR>
|
|||
" open coc config
|
||||
nnoremap <leader><space>c :CocConfig<CR>
|
||||
|
||||
" go to definitions
|
||||
nnoremap <leader>gd <Plug>(coc-jump-definition)
|
||||
nnoremap <leader>d <Plug>(coc-jump-definition)
|
||||
|
||||
" smart jumps
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
nmap <silent> g[ <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> g] <Plug>(coc-diagnostic-next)
|
||||
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
let b:ale_fixers = ['uncrustify']
|
||||
let b:ale_linters = {
|
||||
\ 'cs': ['OmniSharp']
|
||||
\}
|
||||
let g:OmniSharp_server_use_mono = 1
|
||||
|
|
|
@ -1,34 +1,31 @@
|
|||
" let b:ale_fixers = ['mix_format']
|
||||
let b:ale_linters = ['dogma', 'credo', 'dialyxir', 'mix']
|
||||
" let g:ale_elixir_elixir_ls_release = '/Users/danielflanagan/Documents/code/open-source/elixir-ls/'
|
||||
|
||||
let g:elixirls = {
|
||||
\ 'path': printf('%s/%s', stdpath('config'), 'bundle/elixir-ls'),
|
||||
\ }
|
||||
\ 'path': printf('%s/%s', stdpath('config'), 'bundle/elixir-ls'),
|
||||
\ }
|
||||
|
||||
let g:elixirls.lsp = printf(
|
||||
\ '%s/%s',
|
||||
\ g:elixirls.path,
|
||||
\ 'release/language_server.sh')
|
||||
\ '%s/%s',
|
||||
\ g:elixirls.path,
|
||||
\ 'release/language_server.sh')
|
||||
|
||||
function! g:elixirls.compile(...)
|
||||
let l:commands = join([
|
||||
\ 'mix local.hex --force',
|
||||
\ 'mix local.rebar --force',
|
||||
\ 'mix deps.get',
|
||||
\ 'mix compile',
|
||||
\ 'mix elixir_ls.release'
|
||||
\ ], '&&')
|
||||
let l:commands = join([
|
||||
\ 'mix local.hex --force',
|
||||
\ 'mix local.rebar --force',
|
||||
\ 'mix deps.get',
|
||||
\ 'mix compile',
|
||||
\ 'mix elixir_ls.release'
|
||||
\ ], '&&')
|
||||
|
||||
echom '>>> Compiling elixirls'
|
||||
silent call system(l:commands)
|
||||
echom '>>> elixirls compiled'
|
||||
echom '>>> Compiling elixirls'
|
||||
silent call system(l:commands)
|
||||
echom '>>> elixirls compiled'
|
||||
endfunction
|
||||
|
||||
call coc#config('languageserver', {
|
||||
\ 'elixir': {
|
||||
\ 'command': g:elixirls.lsp,
|
||||
\ 'trace.server': 'verbose',
|
||||
\ 'filetypes': ['elixir', 'eelixir']
|
||||
\ }
|
||||
\})
|
||||
\ 'elixir': {
|
||||
\ 'command': g:elixirls.lsp,
|
||||
\ 'trace.server': 'verbose',
|
||||
\ 'filetypes': ['elixir', 'eelixir']
|
||||
\ }
|
||||
\})
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
let b:ale_fixers = ['prettier', 'eslint']
|
1
apps/neovim/ftplugin/lua.vim
Normal file
1
apps/neovim/ftplugin/lua.vim
Normal file
|
@ -0,0 +1 @@
|
|||
call coc#config('languageserver', {"lua": {"command": "lua-lsp", "filetypes": ["lua"]}})
|
12
apps/neovim/ftplugin/moon.vim
Normal file
12
apps/neovim/ftplugin/moon.vim
Normal file
|
@ -0,0 +1,12 @@
|
|||
" let g:moonscriptls = {'path': printf('/home/daniel/code/open-source/moonscript-language-server')}
|
||||
|
||||
" let g:moonscriptls.lsp = printf('%s/main.moon', g:moonscriptls.path)
|
||||
|
||||
" call coc#config('languageserver', {
|
||||
" \ 'moon': {
|
||||
" \ 'command': g:moonscriptls.lsp,
|
||||
" \ 'trace.server': 'verbose',
|
||||
" \ 'filetypes': ['moon']
|
||||
" \ }
|
||||
" \})
|
||||
|
|
@ -1,2 +1 @@
|
|||
let b:ale_linters = ['rls']
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
let b:ale_fixers = ['tslint']
|
||||
let b:ale_linters = ['tsserver']
|
|
@ -1 +0,0 @@
|
|||
" let b:ale_fixers = ['vint']
|
|
@ -1,2 +1 @@
|
|||
let b:ale_fixers = ['prettier', 'eslint']
|
||||
autocmd FileType vue syntax sync fromstart
|
||||
|
|
|
@ -84,7 +84,7 @@ Plug 'tpope/vim-eunuch' " unix helper co
|
|||
Plug 'sheerun/vim-polyglot' " vim plugin loader for many languages
|
||||
Plug 'leafo/moonscript-vim', {'for': ['moon', 'moonscript']} " moonscript language
|
||||
Plug 'OmniSharp/omnisharp-vim', {'for': ['cs']} " C# language
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} " language server completion
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} " language server interface
|
||||
Plug 'JakeBecker/elixir-ls', {'for': ['elixir', 'eelixir'], 'do': { -> g:elixirls.compile() }}
|
||||
Plug 'tpope/vim-dadbod' " vim
|
||||
Plug 'lytedev/elm-vim', {'for': ['elm']} " elm lang
|
||||
|
|
|
@ -76,12 +76,13 @@ set splitbelow " don't split top
|
|||
set noerrorbells " shhhh, vim
|
||||
set visualbell " but visual noise for alerts is ok
|
||||
set nobackup " sessions handle this quite nicely
|
||||
set nowritebackup " no but really they do
|
||||
set noswapfile " no seriously sessions are cool
|
||||
set nowritebackup " no, but really, they do
|
||||
set noswapfile " no, seriously, sessions are cool
|
||||
set timeout " key combo mapping timeout
|
||||
set ttimeoutlen=100 " ms delay for tapping key combos
|
||||
set timeoutlen=150 " ms for key combo mapping timeout
|
||||
set isfname+=32 " allow filenames to show them 32s
|
||||
set updatetime=300 " recommended for coc.nvim
|
||||
|
||||
" no freakin' bell
|
||||
set visualbell t_vb=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
pacaur --needed -S \
|
||||
neomutt `# Email Client` \
|
||||
|
@ -59,7 +59,17 @@ pacaur --needed -S \
|
|||
mkdir -p "$HOME/.urxvt/ext"
|
||||
curl -L -o "$HOME/.urxvt/ext/resize-font" https://raw.githubusercontent.com/lytedev/urxvt-resize-font/master/resize-font
|
||||
|
||||
# install our font (customized iosevka from https://github.com/lytedev/iosevka)
|
||||
(
|
||||
curl -L -o "$HOME/font.tar.zstd" https://lyte.dev/uploads/lyte-font.tar.zstd
|
||||
mkdir "$HOME/.fonts"
|
||||
cd "$HOME/.fonts" || return
|
||||
tar --zstd -xvf "$HOME/font.tar.zstd"
|
||||
rm "$HOME/font.tar.zstd"
|
||||
fc-cache -f
|
||||
)
|
||||
|
||||
# helpful Lua libs
|
||||
<<< "fun moonscript lpeg alt-getopt luafilesystem" tr ' ' "\n" | xargs -I % sudo luarocks install %
|
||||
echo "fun moonscript lpeg alt-getopt luafilesystem" | tr ' ' "\n" | xargs -I % sudo luarocks install %
|
||||
|
||||
# TODO: recommend systemd services?
|
||||
|
|
27
bin/upload
27
bin/upload
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# TODO: progress bar!
|
||||
|
||||
|
@ -9,21 +9,20 @@ fname="${2:-$(basename "${f}")}"
|
|||
subdir="${3:-uploads}"
|
||||
internal_dir="/home/daniel/services/data/files/${subdir}"
|
||||
url="https://lyte.dev/${subdir}/${fname}"
|
||||
uuid="$(uuidgen -t)"
|
||||
|
||||
[ "${f}" == "" ] && echo "No file provided. Exiting." >&2 && exit 2
|
||||
[ "${f}" = "" ] && echo "No file provided. Exiting." >&2 && exit 2
|
||||
[ ! -f "${f}" ] && echo "File '$f' does not exist. Exiting." >&2 && exit 1
|
||||
|
||||
ssh ld mkdir -p "${internal_dir}"
|
||||
rsync_output="$(rsync --no-owner --no-group --no-perms --stats --ignore-existing "${f}" "${HOST}:${internal_dir}/${fname}")"
|
||||
ssh ld chmod a+r "${internal_dir}/${fname}"
|
||||
num_uploaded="$(<<< "${rsync_output}" grep -oP "Number of created files: \K\d+")"
|
||||
|
||||
if [[ $num_uploaded -eq 1 ]]; then
|
||||
echo "${f} uploaded to ${url}"
|
||||
elif [[ "$(curl -s -o /dev/null -w "%{http_code}" "${url}")" -eq 200 ]]; then
|
||||
if [ "$(curl -s -o /dev/null -w "%{http_code}" "${url}")" -eq 200 ]; then
|
||||
echo "ERROR: A file already exists at ${url}"
|
||||
else
|
||||
echo "${rsync_output}" >> "${HOME}/.upload.log"
|
||||
echo "ERROR: The file failed to upload - perhaps rsync failed for some reason?\n See \"${HOME}/.upload.log\" for details"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
ssh ld mkdir -p "${internal_dir}"
|
||||
rsync --progress --no-owner --no-group --no-perms --stats --ignore-existing "${f}" "${HOST}:${internal_dir}/${fname}" | tee "${HOME}/.upload.log"
|
||||
code="$?"
|
||||
ssh ld chmod a+r "${internal_dir}/${fname}"
|
||||
|
||||
if [ "$code" -ne 0 ]; then
|
||||
printf "ERROR: The file failed to upload - perhaps rsync failed for some reason?\n See \"%s/.upload.log\" for details\n" "$HOME"
|
||||
fi
|
||||
|
|
Reference in a new issue