From 0eb22fcfd9ac56b8a090d385852000d92be01b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 26 May 2020 04:53:43 +0200 Subject: [PATCH] Restructure installation paths --- Cargo.toml | 7 ++++--- ghe-fast-tools/bin/ghe-fast-console | 2 ++ ghe-fast-tools/bin/ghe-fast-console.rb | 2 -- github-fast-env/bin/github-fast-env | 2 ++ .../{github-fast-envd.rb => bin/github-fast-envd} | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 ghe-fast-tools/bin/ghe-fast-console delete mode 100644 ghe-fast-tools/bin/ghe-fast-console.rb create mode 100644 github-fast-env/bin/github-fast-env rename github-fast-env/{github-fast-envd.rb => bin/github-fast-envd} (97%) diff --git a/Cargo.toml b/Cargo.toml index c8900c3..b7cacdb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,10 +7,11 @@ edition = "2018" [package.metadata.deb] assets = [ - ["github-fast-env/github-fast-envd.rb", "usr/bin/github-fast-envd", "755"], - ["github-fast-env/github-fast-env.rb", "usr/bin/github-fast-env", "755"], + ["github-fast-env/bin/github-fast-envd", "usr/bin/", "755"], + ["github-fast-env/bin/github-fast-env", "usr/bin/", "755"], + ["github-fast-env/github-fast-env.rb", "usr/lib/github-fast-env/", "755"], ["github-fast-env/preload.rb", "usr/lib/github-fast-env/", "755"], ["github-fast-env/systemd/github-fast-envd.service", "usr/lib/systemd/system/", "644"], ["ghe-fast-tools/ghe-fast-console.rb", "usr/lib/ghe-fast-tools/", "644"], - ["ghe-fast-tools/bin/ghe-fast-console.rb", "usr/bin/ghe-fast-console", "755"], + ["ghe-fast-tools/bin/ghe-fast-console", "usr/bin/", "755"], ] diff --git a/ghe-fast-tools/bin/ghe-fast-console b/ghe-fast-tools/bin/ghe-fast-console new file mode 100644 index 0000000..faef59a --- /dev/null +++ b/ghe-fast-tools/bin/ghe-fast-console @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +/usr/bin/github-fast-env --interactive /usr/lib/ghe-fast-tools/ghe-fast-console.rb diff --git a/ghe-fast-tools/bin/ghe-fast-console.rb b/ghe-fast-tools/bin/ghe-fast-console.rb deleted file mode 100644 index 44a2181..0000000 --- a/ghe-fast-tools/bin/ghe-fast-console.rb +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -sudo /usr/bin/github-fast-env --interactive /usr/lib/ghe-fast-tools/ghe-fast-console.rb diff --git a/github-fast-env/bin/github-fast-env b/github-fast-env/bin/github-fast-env new file mode 100644 index 0000000..059ba05 --- /dev/null +++ b/github-fast-env/bin/github-fast-env @@ -0,0 +1,2 @@ +#/usr/bin/env bash +/usr/lib/github-fast-env/github-fast-env.rb "$@" diff --git a/github-fast-env/github-fast-envd.rb b/github-fast-env/bin/github-fast-envd similarity index 97% rename from github-fast-env/github-fast-envd.rb rename to github-fast-env/bin/github-fast-envd index 4382c24..60052a5 100644 --- a/github-fast-env/github-fast-envd.rb +++ b/github-fast-env/bin/github-fast-envd @@ -85,7 +85,7 @@ def read_command(control_socket) end def set_up_named_pipes(control_socket, connection_id) - pipe_base_path = "/#{$run_base_path}/github-fast-envd.#{connection_id}" + pipe_base_path = "/#{$runtime_directory}/github-fast-envd.#{connection_id}" pipe_base_path_encoded = Base64.encode64(pipe_base_path).delete("\n") stdin = open_pipe("#{pipe_base_path}.stdin") @@ -119,7 +119,7 @@ def set_up_named_pipes(control_socket, connection_id) end def clean_up_named_pipes(control_socket, connection_id) - pipe_base_path = "/#{$run_base_path}/github-fast-envd.#{connection_id}" + pipe_base_path = "/#{$runtime_directory}/github-fast-envd.#{connection_id}" if File.exist?("#{pipe_base_path}.stdin") File.delete("#{pipe_base_path}.stdin")