Skip to content

Commit

Permalink
add: lua script
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhnajafiz committed Aug 5, 2023
1 parent 5f771b1 commit afb8b8a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions install/install.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--
-- constant variables
--
local GIT_REPO = "https://github.com/amirhnajafiz/captain-mustache.git";
local MESSAGE = "In order to use `captain-mustache` in every place on your system, make sure to" +
"the followings to either `~/.zshrc`, `~/.bash_profile`, or `~/.bashrc`." + "\n";
local EXPORT = "export PATH=\"<path-to-cloned-repository>:`$PATH`\"" + "\n" +
"export STRAGO_PATH="<path-to-cloned-repository>"";


--
-- importing bash module
--
local sh = require('sh');

--
-- build our commands
--
local cloneCommand = sh.command('git', 'clone');
local makeFileCommand = sh.command('make');
local echoCommand = sh.command('echo');

--
-- clone into repository
--
cloneCommand(GIT_REPO);

--- build
makeFileCommand('build');

echoCommand(MESSAGE);
echoCommand(EXPORT);

0 comments on commit afb8b8a

Please sign in to comment.