dev
List of commits:
Subject Hash Author Date (UTC)
fixes for zsh adf6eae26569cac8c0487c0d7d62549ee2ac3df4 mucbuc 2020-08-19 04:54:15
ggSemver aeb7c2eacf3a4f96a543b98dad9d96a45741a067 mucbuc 2020-07-31 18:03:35
install fzf 1a5c8887ffe61c1a0699c48e6c5b6f756811f953 mucbuc 2020-07-26 10:59:24
move utils into base 4215714e30c44cd28b99a47b9809c379b5a6f5b1 mucbuc 2020-07-25 11:14:02
single branch 4e7951ffa4679e6aede7e41e9bb8afcc256cfdbe mucbuc 2020-07-25 04:11:11
install minpac ea2855da3c825616fbf41621caabe93ff6952651 mucbuc 2020-07-25 04:04:25
fix symlink direction 58c6f88e75de4b660aa5d1635d6ed30722531c10 mucbuc 2020-07-24 14:55:46
working on symlinking dot files 4776a043a739cb668621575853090fd3169d49b1 mucbuc 2020-07-24 14:44:31
source on session 440a64a0f75de56580b1b50c297b53dd2273781f mucbuc 2020-07-24 14:17:32
cleanup 18562b90e1ae6e111748c5ee9aa556f832bc4297 mucbuc 2020-07-19 14:54:23
README.md de769b63ff8f23a593dc1f16ac2838973bdef13a Ubuntu 2020-07-13 21:07:27
format 11b3b5dda7f9897eac97a3a07d48404c72f8c945 mucbuc 2020-07-08 04:01:06
pre-commit not linting a6150b39d873c4796ea7f0eb02f116f7c5068124 mucbuc 2020-07-08 03:42:52
stagedFiles 09505713d1e6eb5da489a5081fe904794110b8a0 mucbuc 2020-07-08 03:40:49
lint 36aa6510d88da2d7cdde5fb776a33ef6d20f5242 mucbuc 2020-07-08 03:28:02
copy scripts 2010244fc51915c8700b370a04aa9ea1af6de30d mucbuc 2020-07-07 09:23:09
dont add changes from lint b0a615143517985a99f929b1f313751cc9369bb6 mucbuc 2020-07-05 04:43:28
pre-commit.js a4ab48e75e496071f24a910524f8ec788c0f5309 mucbuc 2020-07-05 04:28:05
install husky 97104fc9ba4dd4164bf29eaf7505f10d61ace7d7 mucbuc 2020-07-05 04:21:51
print commands 054c9efa2ae06a16f05a080b111cb3b1b27f3287 mucbuc 2020-07-05 04:17:28
Commit adf6eae26569cac8c0487c0d7d62549ee2ac3df4 - fixes for zsh
Author: mucbuc
Author date (UTC): 2020-08-19 04:54
Committer name: mucbuc
Committer date (UTC): 2020-08-19 04:54
Parent(s): aeb7c2eacf3a4f96a543b98dad9d96a45741a067
Signing key:
Tree: 9f3d7e37fa4beee024381425ca89d4824cf2cbbb
File Lines added Lines deleted
base.js 18 3
pre-commit.js 5 13
File base.js changed (mode: 100644) (index 45af94f..2775b7a)
... ... const shell = require("shelljs"),
4 4 ansi = require("ansi"), ansi = require("ansi"),
5 5 cursor = ansi(process.stdout), cursor = ansi(process.stdout),
6 6 homedir = require("os").homedir(), homedir = require("os").homedir(),
7 bashPath = path.join(homedir, ".bashrc"),
7 rcPath = getRCFilePath(),
8 8 exec = shell.exec, exec = shell.exec,
9 9 { COPYFILE_EXCL } = fs.constants; { COPYFILE_EXCL } = fs.constants;
10 10
11 function getRCFilePath() {
12 try {
13 fs.accessSync(path.join(homedir, ".zshrc"));
14 return ".zshrc";
15 } catch (err) {
16 try {
17 fs.accessSync(path.join(homedir, ".bashrc"));
18 return ".bashrc";
19 } catch (err) {
20 console.error("No bash file found");
21 throw err;
22 }
23 }
24 }
25
11 26 function cloneRepo(url, dest) { function cloneRepo(url, dest) {
12 27 return exec(`git clone ${url} --depth=1 --single-branch ${dest}`); return exec(`git clone ${url} --depth=1 --single-branch ${dest}`);
13 28 } }
 
... ... function installFile(fileName) {
31 46
32 47 function sourceOnSession(scriptName) { function sourceOnSession(scriptName) {
33 48 const scriptPath = path.join(__dirname, scriptName); const scriptPath = path.join(__dirname, scriptName);
34 let bashRC = fs.readFileSync(bashPath, "utf8");
49 let bashRC = fs.readFileSync(rcPath, "utf8");
35 50 if (!bashRC.match(scriptName)) { if (!bashRC.match(scriptName)) {
36 51 console.log(`installing ${scriptName}`); console.log(`installing ${scriptName}`);
37 52 bashRC += `\n. ${scriptPath}`; bashRC += `\n. ${scriptPath}`;
38 fs.writeFileSync(bashPath, bashRC);
53 fs.writeFileSync(rcPath, bashRC);
39 54 } else { } else {
40 55 console.log(`${scriptName} already installed`); console.log(`${scriptName} already installed`);
41 56 } }
File pre-commit.js changed (mode: 100755) (index fd74a26..feded20)
2 2
3 3 const shellExec = require("shelljs").exec, const shellExec = require("shelljs").exec,
4 4 fs = require("fs"), fs = require("fs"),
5 path = require( 'path' ),
5 path = require("path"),
6 6 { tryAndRunScript, print } = require("./base"), { tryAndRunScript, print } = require("./base"),
7 7 exec = function (cmd) { exec = function (cmd) {
8 print(cmd);
9 8 return shellExec(cmd); return shellExec(cmd);
10 9 }; };
11 10
12 print(__filename);
13 const stagedFiles = shellExec(`git diff --staged --name-only`, {
14 silent: true,
15 }).stdout.split("\n"),
16 hasChanges = stagedFiles.length > 1;
17 if (hasChanges) {
18 exec("git stash --keep-index -q");
19 }
11 exec(`git stash push --keep-index`);
12
20 13 for (const step of ["test.js"]) { for (const step of ["test.js"]) {
21 14 if (!tryAndRunScript(path.join(process.cwd(), step))) { if (!tryAndRunScript(path.join(process.cwd(), step))) {
22 15 break; break;
23 16 } }
24 17 } }
25 if (hasChanges) {
26 exec("git stash pop -q");
27 }
18
19 exec("git stash pop");
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mucbuc/configs

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mucbuc/configs

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/configs

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main