Last active
October 17, 2016 19:40
-
-
Save codersquid/10c978e0f792f0e59290f0a93a11c3df to your computer and use it in GitHub Desktop.
quick script to troubleshoot what is going on with recursive push
This file contains hidden or 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
#!/bin/sh | |
set -ex | |
LXC=/home/sheila/gopath/bin/lxc | |
COUNT=${1:-5} | |
echo making $COUNT test files | |
rm -rf exampledir | |
mkdir exampledir | |
for i in $(seq $COUNT) | |
do | |
echo testing > exampledir/testfile$i | |
done | |
echo Launching container | |
NAME=$($LXC launch ubuntu:16.04 | grep Starting | awk '{print $2}') | |
if [ -z "$NAME" ]; then | |
echo Unable to create container. exiting... | |
exit 1 | |
fi | |
echo Created $NAME | |
echo pushing files | |
$LXC file push -r $(pwd) $NAME/tmp | |
echo listing remote files in /tmp | |
$LXC exec $NAME -- find /tmp | |
echo local files | |
tree $(pwd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment