forked from justjanne/powerline-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generatePreview.sh
executable file
·51 lines (39 loc) · 1.25 KB
/
generatePreview.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
FLAGS="-modules cwd,git,root"
mkdir -p /tmp/home/code/dotfiles;
cd /tmp/home/code/dotfiles/;
git init;
touch file1;
git add .;
git commit -m "commit";
touch file2;
mkdir -p /tmp/home/deep/down/into/the/abyss/of/directories/where/no/one/ever/comes/;
cd /tmp/home/deep/down/into/the/abyss/of/directories/where/no/one/ever/comes/;
git init;
touch file1;
git add .;
git commit -m "commit";
echo "test">file1;
git stash;
export HOME=/tmp/home/
clear;
cd /tmp/home/code/dotfiles/;
powerline-go -shell bare $FLAGS;
echo git branch;
git branch;
powerline-go -shell bare $FLAGS;
echo badcmd;
echo "bash: badcmd: command not found";
powerline-go -shell bare $FLAGS -error 1;
echo "cd ~/deep/down/into/the/abyss/of/directories/where/no/one/ever/comes/";
cd /tmp/home/deep/down/into/the/abyss/of/directories/where/no/one/ever/comes/;
powerline-go -shell bare $FLAGS;
# terraform
if hash terraform 2>/dev/null; then
mkdir -p /tmp/home/terraform && cd /tmp/home/terraform
echo "create terraform workspace named 'production' at ~/terraform"
terraform init 1>/dev/null && terraform workspace new production 1>/dev/null
powerline-go -shell bare $FLAGS
fi
rm -rf /tmp/home;
echo;echo;echo;echo;echo;echo;echo;echo;echo;echo;echo;echo;echo;echo;echo;echo;