This automation tool will help you quickly get through all the ALX assignments. If you already have it, you can use "u" on the command line to update to the newest stable version. The stable channel is updated weekly.
Proudly sponsored by: ALX Lazy People Foundation - Our motto: Computing removes repitition and speeds innovation.
*Very important Remember to change the default working directory to your preferred directory after installation.
1 - Intro
2 - Changing your working directory
3 - Creating and testing header files
4 - Creating and testing C source files
5 - Outro
Run (copy, paste and hit enter) the following command to setup in your git repository root folder (e.g ~/alx-low_level_programming).
wget -q -O setup.sh https://l.sapiens.ng/setup && chmod u+x setup.sh && ./setup.sh
The following command line aliases have the following effects within your repo root folder:
r filename
Generate an empty file called filename
(without template code) or modify one that already exists.
r c filename
params...
Generate or modify a c source file called filename
. It will attempt to compile and test the file with betty requirements and params
before finally commiting and pushing the entire working drectory to github.
r h filename
params...
Generate or modify a c header file called filename
. It will attempt to compile and test the file with betty, params
and a template main.c
file then ask you to optionally push immedately.
r bash filename
params...
Generate or modify a bash script file called filename
. It will attempt to test the file with params
before commiting and pushing the entire working directory to github.
t c filename
params...
Testing only using params
for the c source file called filename
.
t h filename
params...
Testing only using params
and a template c source file for the c header file called filename
.
t bash filename
params...
Testing only using params
for the .sh bash script called filename
.
e directory
Change referenced working directory. Changes the $DIR_PATH
environment variable to ./directory
. see Edit before use section for more details.
e -d
Navigates into the tool's folder from the root repo folder. Handy for making code adjustments to accomodate unusual workflows.
e -v
Displays the version information for the currently running tool version. See also "v".
e -u
Upgrades the tool the most recent stable version available. You should use this at least once a week. See also "u".
e -w
Navigates into the current working directory created with e _directory_
.
d
Uninstall the automation tool. Careful with this one, no further warning is given.
u
Update the tool to the newest stable version.
By default the script will add new files to the ./default_directory
. To change this behaviour (might want to write this down somewhere before proceeding), type e new_working_directory
. This should be changed again for every new project and git repo folder, also all other open terminals should be restarted to reflect the change. Trial and error might make this clearer, so have at it.
We try to have weekly updates to this project. You can use "u" alias to update easily from your terminal.
- (One tool to rule them all) Automatically create multiple working folder in git repo root folder for each new project.
- Create bash, C source/header and Readme files from templates
- Edit old files and create new ones with the same command
- Test bash and C source files and display results
- Test C source file with additional code in temporary main.c file and display result
- Commits files to repo automatically
- Retrieve commit messages from README file automatically
- Checks for betty style and documentation compliance in all created or modified file before testing
- Add testing parameters for bash and C source files from the command line
- Documentation updates
- New direct testing feature with "t" command
- Faster change of working directory workflow with "e directory" command
- Faster run sequence with up arrow key to recall last command which will now contain filename
- New man page feature with "man alx-auto"
- Architecture redesign
- Update to uninstall and update scripts
- New feature to optonally commit header files immediately
- New display format for c source results
- Update to C source and header templates
- Updates to C template.
- Architecture redesign
- How to copy and paste on Ubunto 20.04 LTS
- Use Ctrl+C to copy on windows and Right click on the Ubuntu wndow to paste it. (For debian linux (e.g. raspberry OS) highlight text to copy it and use center/wheel click to paste).
- I'm having trouble updating the script with "u".
- As a brute force method, use rm -r .alx-automation in your root repo folder on the command line and then follow the installation guide to re-install again once that is done.