Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Creating docker share folder in the users home directory and a fix fo…
Browse files Browse the repository at this point in the history
…r docker-machine-nfs on linux
  • Loading branch information
Ahmed Sghaier committed Apr 4, 2016
1 parent 07ca1c7 commit f5fff97
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
24 changes: 23 additions & 1 deletion .ahoy/arch.ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ commands:
echo; echo "*** Dependencies Setup ***"; echo
set -e
echo "*** Creating the docker share folder at: $HOME/docker ..."
share="$HOME/docker"
if [ -e "$share" ]; then
echo -n "[Warning] $share exits. Are you sure you want to remove $share ? (Y/n) "
confirm="?"
while [[ $confirm != "y" ]] && [[ $confirm != "n" ]] && [[ $confirm != "" ]]; do
read confirm
confirm=$(echo $confirm|tr '[:upper:]' '[:lower:]')
done
if [[ $confirm == "n" ]]; then
echo "[Continue] $share is untouched. Press Enter to continue the installation or press Ctrl+C / Command+C to abort the installation."
read
else
echo "[Warning] $share will be removed. Press Enter to remove the folder and continue with the installation or press Ctrl+C / Command+C to abort the installation."
read
rm -rf $share
mkdir $share
fi
else
mkdir $share
fi
echo "*** Setting up perl-digest-hmac..."
yaourt -S perl-digest-hmac
Expand Down Expand Up @@ -53,7 +75,7 @@ commands:
set -e
echo "*** Docker-machine-nfs setup..."
sudo wget -q https://raw.githubusercontent.com/asghaier/docker-machine-nfs/arch-linux-support/docker-machine-nfs.sh -O /usr/local/bin/docker-machine-nfs && sudo chmod 755 /usr/local/bin/docker-machine-nfs
sudo wget -q https://raw.githubusercontent.com/asghaier/docker-machine-nfs/civic-1817-fixing-linux-bugs/docker-machine-nfs.sh -O /usr/local/bin/docker-machine-nfs && sudo chmod 755 /usr/local/bin/docker-machine-nfs
echo "*** NTP and NFS-utils setup..."
yaourt -S ntp nfs-utils
Expand Down
24 changes: 23 additions & 1 deletion .ahoy/debian.ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ commands:
echo; echo "*** Dependencies Setup ***"; echo
set -e
echo "*** Creating the docker share folder at: $HOME/docker ..."
share="$HOME/docker"
if [ -e "$share" ]; then
echo -n "[Warning] $share exits. Are you sure you want to remove $share ? (Y/n) "
confirm="?"
while [[ $confirm != "y" ]] && [[ $confirm != "n" ]] && [[ $confirm != "" ]]; do
read confirm
confirm=$(echo $confirm|tr '[:upper:]' '[:lower:]')
done
if [[ $confirm == "n" ]]; then
echo "[Continue] $share is untouched. Press Enter to continue the installation or press Ctrl+C / Command+C to abort the installation."
read
else
echo "[Warning] $share will be removed. Press Enter to remove the folder and continue with the installation or press Ctrl+C / Command+C to abort the installation."
read
rm -rf $share
mkdir $share
fi
else
mkdir $share
fi
echo "*** Installing Perl digest hmac..."
sudo apt-get install libdigest-hmac-perl -y
Expand Down Expand Up @@ -76,7 +98,7 @@ commands:
# Note that we needed to modify the docker-machine-nfs script to work with linux. So load the custom version.
# See https://github.com/adlogix/docker-machine-nfs/pull/51
echo "*** Installing docker-machine-nfs (custom version)..."
sudo wget -q https://raw.githubusercontent.com/devinci-code/docker-machine-nfs/dev-50-support-linux/docker-machine-nfs.sh -O /usr/local/bin/docker-machine-nfs && sudo chmod 755 /usr/local/bin/docker-machine-nfs
sudo wget -q https://raw.githubusercontent.com/asghaier/docker-machine-nfs/civic-1817-fixing-linux-bugs/docker-machine-nfs.sh -O /usr/local/bin/docker-machine-nfs && sudo chmod 755 /usr/local/bin/docker-machine-nfs
machine:
usage: Create the "default" Docker machine
Expand Down
22 changes: 22 additions & 0 deletions .ahoy/mac.ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ commands:
echo; echo "*** Dependencies Setup ***"; echo
set -e
echo "*** Creating the docker share folder at: $HOME/docker ..."
share="$HOME/docker"
if [ -e "$share" ]; then
echo -n "[Warning] $share exits. Are you sure you want to remove $share ? (Y/n) "
confirm="?"
while [[ $confirm != "y" ]] && [[ $confirm != "n" ]] && [[ $confirm != "" ]]; do
read confirm
confirm=$(echo $confirm|tr '[:upper:]' '[:lower:]')
done
if [[ $confirm == "n" ]]; then
echo "[Continue] $share is untouched. Press Enter to continue the installation or press Ctrl+C / Command+C to abort the installation."
read
else
echo "[Warning] $share will be removed. Press Enter to remove the folder and continue with the installation or press Ctrl+C / Command+C to abort the installation."
read
rm -rf $share
mkdir $share
fi
else
mkdir $share
fi
# Assume homebrew is a requirement for now
if [ ! "$(which brew)" ]; then
echo "[Error] It looks like homebrew isn't installed. Please install that first."
Expand Down

0 comments on commit f5fff97

Please sign in to comment.