github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/demos/demo-magic/samples/demo-template.sh (about) 1 #!/usr/bin/env bash 2 # Copyright 2019 Google LLC 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 17 ######################## 18 # include the magic 19 ######################## 20 . ../demo-magic.sh 21 22 23 ######################## 24 # Configure the options 25 ######################## 26 27 # 28 # speed at which to simulate typing. bigger num = faster 29 # 30 # TYPE_SPEED=20 31 32 # 33 # custom prompt 34 # 35 # see http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html for escape sequences 36 # 37 DEMO_PROMPT="${GREEN}➜ ${CYAN}\W " 38 39 # hide the evidence 40 clear 41 42 43 # put your demo awesomeness here 44 if [ ! -d "stuff" ]; then 45 pe "mkdir stuff" 46 fi 47 48 pe "cd stuff" 49 50 pe "ls" 51 52 p "cat \"something you dont want to really run\"" 53 54 # show a prompt so as not to reveal our true nature after 55 # the demo has concluded 56 p ""