Skip to content

Commit

Permalink
Updating to 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JezerM committed Jan 30, 2022
1 parent f66027e commit 764a196
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ Themes working in **web-greeter** should work also here. All themes shipped with
- gobject-introspection
- liblightdm-gobject
- liblightdm-gobject-dev
- libgirepository1.0-dev
- libcairo2
- libcairo2-dev
- libxcb-dev
- libx11-dev

Expand Down
24 changes: 20 additions & 4 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const ora = require("ora");

let DEST_DIR = "/";
let PREFIX = "/usr";
let INSTALL_ZSH_COMPLETION = true;
let INSTALL_BASH_COMPLETION = true;
let ARCH = process.arch;
let INSTALL_ROOT = path.resolve(__dirname, "./build/unpacked/");
let ASAR_ROOT = path.resolve(__dirname, "./build/nody-asar/");
Expand Down Expand Up @@ -44,13 +46,25 @@ let argv = yargs
describe: "Architecture to build for",
default: ARCH,
})
.option("INSTALL_ZSH_COMPLETION", {
type: "boolean",
describe: "Wheter to install zsh completion",
default: INSTALL_ZSH_COMPLETION,
})
.option("INSTALL_BASH_COMPLETION", {
type: "boolean",
describe: "Wheter to install bash completion",
default: INSTALL_BASH_COMPLETION,
})
.help("h")
.alias("h", "help")
.version(false).argv;

DEST_DIR = argv.DEST_DIR;
PREFIX = argv.PREFIX;
ARCH = argv.ARCH;
INSTALL_ZSH_COMPLETION = argv.INSTALL_ZSH_COMPLETION;
INSTALL_BASH_COMPLETION = argv.INSTALL_BASH_COMPLETION;

// Some global variables

Expand Down Expand Up @@ -230,8 +244,10 @@ function create_install_root() {
fs.mkdirsSync(xdg_ldm_path, { recursive: true });
fs.mkdirsSync(xgreeters_path, { recursive: true });
fs.mkdirsSync(applications_path, { recursive: true });
if (check_program("bash")) fs.mkdirsSync(bash_c_path, { recursive: true });
if (check_program("zsh")) fs.mkdirsSync(zsh_c_path, { recursive: true });
if (check_program("bash") && INSTALL_BASH_COMPLETION)
fs.mkdirsSync(bash_c_path, { recursive: true });
if (check_program("zsh") && INSTALL_ZSH_COMPLETION)
fs.mkdirsSync(zsh_c_path, { recursive: true });
}

let copies_prepare = [
Expand Down Expand Up @@ -267,12 +283,12 @@ let copies_prepare = [

async function prepare_install() {
create_install_root();
if (check_program("bash"))
if (check_program("bash") && INSTALL_BASH_COMPLETION)
copies_prepare.push({
from: "./dist/nody-greeter-bash",
to: path.join(bash_c_path, "nody-greeter"),
});
if (check_program("zsh"))
if (check_program("zsh") && INSTALL_ZSH_COMPLETION)
copies_prepare.push({
from: "./dist/nody-greeter-zsh",
to: path.join(zsh_c_path, "_nody-greeter"),
Expand Down
2 changes: 1 addition & 1 deletion build/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: nody-greeter
Version: 1.3.0
Version: 1.4.0
Provides: lightdm-greeter
Replaces: lightdm-webkit-greeter
Section: x11
Expand Down
12 changes: 12 additions & 0 deletions make.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const yargs = require("yargs");

let DEST_DIR = "/";
let PREFIX = "/usr";
let INSTALL_ZSH_COMPLETION = true;
let INSTALL_BASH_COMPLETION = true;
let ARCH = process.arch;
let INSTALL_ROOT = path.resolve(__dirname, "./build/unpacked/");

Expand Down Expand Up @@ -38,6 +40,16 @@ let argv = yargs
describe: "Architecture to build for",
default: ARCH,
})
.option("INSTALL_ZSH_COMPLETION", {
type: "boolean",
describe: "Wheter to install zsh completion",
default: INSTALL_ZSH_COMPLETION,
})
.option("INSTALL_BASH_COMPLETION", {
type: "boolean",
describe: "Wheter to install bash completion",
default: INSTALL_BASH_COMPLETION,
})
.help("h")
.alias("h", "help")
.version(false).argv;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nody-greeter",
"version": "1.3.2",
"version": "1.4.0",
"description": "Node.js (electron) greeter for LightDM",
"main": "js/index.js",
"scripts": {
Expand Down

0 comments on commit 764a196

Please sign in to comment.