Skip to content

Commit

Permalink
Styling
Browse files Browse the repository at this point in the history
  • Loading branch information
francescobianco committed Mar 28, 2023
1 parent ff1c739 commit e764ce1
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 24 deletions.
24 changes: 2 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
/vendor/
node_modules/
npm-debug.log
yarn-error.log

# Laravel 4 specific
bootstrap/compiled.php
app/storage/

# Laravel 5 & Lumen specific
public/storage
public/hot

# Laravel 5 & Lumen specific with changed public path
public_html/storage
public_html/hot

storage/*.key
.idea/
.vscode/
.env
Homestead.yaml
Homestead.json
/.vagrant
.phpunit.result.cache
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

-include .env
export $(shell test -f .env && cut -d= -f1 .env)

## ======
## Remote
## ======

remote-init:
@sshpass -p $${REMOTE_PASSWORD} scp -P $${REMOTE_PORT:-22} contrib/remote-*.sh $${REMOTE_USER}@${REMOTE_HOST}:/tmp/

remote-bash:
@sshpass -p $${REMOTE_PASSWORD} ssh $${REMOTE_USER}@${REMOTE_HOST} -p $${REMOTE_PORT:-22} -T bash /tmp/remote-bash.sh

remote-sudo-bash: remote-init
@sshpass -p $${REMOTE_PASSWORD} ssh $${REMOTE_USER}@${REMOTE_HOST} -p $${REMOTE_PORT:-22} -T bash /tmp/remote-sudo-bash.sh "$${REMOTE_PASSWORD}"

## =====
## Tests
## =====

test-docker-remote:
@cat app/docker.sh | make -s remote-sudo-bash
4 changes: 2 additions & 2 deletions app/docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!
#!/usr/bin/env bash

apt-get remove docker docker-engine docker.io containerd runc || true

apt-get remove docker docker-engine docker.io containerd runc
6 changes: 6 additions & 0 deletions contrib/remote-exec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

tmp_file=$(mktemp)
read -r -d '' input
echo "$input" > "$tmp_file"
bash "$tmp_file"
6 changes: 6 additions & 0 deletions contrib/remote-sudo-bash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

tmp_file=$(mktemp)
read -r -d '' input
echo "$input" > "$tmp_file"
echo "$1" | sudo -S bash +x "$tmp_file"

0 comments on commit e764ce1

Please sign in to comment.