#!/bin/bash
#------------------------------------------------------------------------------
set -u
source mini_functions.sh || { echo "Failed to load mini_functions."; exit 1; }
declare AppRoot=/tmp/fgs
declare Version=1.0.1
msg "Started ${0##*/} v$Version at $(date).\n"
msg "${H1}\nInitialization."
[[ -d $AppRoot ]] && cmd /bin/rm -rf $AppRoot
cmd mkdir $AppRoot
cd $AppRoot || bail "Couldn't cd to $AppRoot."
cmd p4 init -C0 -n
p4 depot -t stream -o fgs | p4 depot -i
p4 stream -t mainline -o //fgs/main | p4 stream -i
p4 client -s -S //fgs/main
cmd mkdir src
cd src
msg "Creating files in $PWD."
echo -e "// hello.h\n\n#ifndef HELLLO_H\n#define HELLO_H 1\n\n// Code goes here.\n\n#endif // HELLO_H\n" > hello.h
echo -e "#include <stdio.h>\n#include \"hello.h\"\n\nint main (int argc, char **argv, char **envp)) {\n printf (\"Hello, World!\");\n\n}" > main.c
cat main.c
echo FileOne > FileOne.txt
echo FileTwo > FileTwo.txt
echo FileThree > FileThree.txt
cmd p4 -s rec
msg Submitting...
p4 -s submit -d "Added FGS."
msg "Creating release r1."
p4 stream -t release -P //fgs/main -o //fgs/r1 | p4 stream -i
# |
Change |
User |
Description |
Committed |
|
#1
|
29256 |
cttyler |
Added FlowOfChangeModeling.sh script and and mini_functions.sh
library. |
|
|