summaryrefslogtreecommitdiff
path: root/functions/imgup.fish
blob: 08a70337a320d97b67ff2e7f935a4b9930ed8ba7 (plain)
1
2
3
4
5
6
7
function imgup
	if test -n (echo $argv | awk '{print $2}')
		cat $argv[1] | ssh nathan@4574.co.uk "sudo su - www-data -c 'cat > /var/www/gallery/$argv[2]'"
	else
		cat $argv[1] | ssh nathan@4574.co.uk "sudo su - www-data -c 'cat > /var/www/gallery/$argv[1]'"
	end
end