wip
This commit is contained in:
		
							
								
								
									
										36
									
								
								examples/scripts/_archive/stdout_test.rhai
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								examples/scripts/_archive/stdout_test.rhai
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// Create a bash script to set up the test environment
 | 
			
		||||
let setup_script = `
 | 
			
		||||
# Configure git to suppress the default branch name warning
 | 
			
		||||
git config --global advice.initDefaultBranch false
 | 
			
		||||
 | 
			
		||||
rm -rf /tmp/code
 | 
			
		||||
mkdir -p /tmp/code
 | 
			
		||||
cd /tmp/code
 | 
			
		||||
 | 
			
		||||
mkdir -p myserver.com/myaccount/repogreen
 | 
			
		||||
mkdir -p myserver.com/myaccount/repored
 | 
			
		||||
 | 
			
		||||
cd myserver.com/myaccount/repogreen
 | 
			
		||||
git init
 | 
			
		||||
echo 'Initial test file' > test.txt
 | 
			
		||||
git add test.txt
 | 
			
		||||
git config --local user.email 'test@example.com'
 | 
			
		||||
git config --local user.name 'Test User'
 | 
			
		||||
git commit -m 'Initial commit'
 | 
			
		||||
 | 
			
		||||
cd /tmp/code/myserver.com/myaccount/repored
 | 
			
		||||
git init
 | 
			
		||||
echo 'Initial test file' > test2.txt
 | 
			
		||||
git add test2.txt
 | 
			
		||||
git config --local user.email 'test@example.com'
 | 
			
		||||
git config --local user.name 'Test User'
 | 
			
		||||
git commit -m 'Initial commit'
 | 
			
		||||
 | 
			
		||||
# now we have 2 repos
 | 
			
		||||
 | 
			
		||||
`;
 | 
			
		||||
 | 
			
		||||
// Run the setup script
 | 
			
		||||
let result = run(setup_script);
 | 
			
		||||
		Reference in New Issue
	
	Block a user