2013-02-15 21:33:55 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# vi:set filetype=makefile
|
|
|
|
NULL=0 exec make "CALL=$0" "EXE=`which $0`" -f "`which $0`" -- "$@"
|
2013-02-06 13:50:11 +01:00
|
|
|
|
|
|
|
PREFIX := /usr/local
|
|
|
|
BIN_PREFIX := $(PREFIX)/bin
|
2015-10-01 21:52:37 +02:00
|
|
|
CAVE_COMMANDS_PREFIX := $(PREFIX)/libexec/cave/commands
|
Logic moved from truckle to cave.
truckle commands to cave added: `cave do`, `cave retry`, `cave upgrade`
You do not need truckle upgrade, now sudo cave upgrade works, too.
These commands do not depend on truckle, it works fine with cave-only.
Environment variables added via `/etc/profile.d/cave.sh`.
At the moment only resume-file-depended variables
(TRUCKLE_RESUME_FILE, CAVE_RESUME_OPTIONS, CAVE_RESOLVE_OPTIONS, ...)
If you use cave, the resume-file will be used automaticaly.
You do not need truckle anymore to have auto-resume-files.
But sudo will remove these from env...
Sudoers-config for cave added via `/etc/sudoers.d/cave`.
sudo will keep the same variables like defined in `/etc/profile.d/cave.sh`.
I do not know, but i think it can be a security hole.
But never allow users to use cave as root!
So, now you can use sudo, too.
These combinations of new cave-related changes will allow this:
sudo cave upgrade
sudo cave do
# something went wrong?
sudo cave retry
Only pagered it is easier with truckle:
sudo cave -cy upgrade | less -R
# vs.
truckle upgrade
2013-07-10 13:37:23 +02:00
|
|
|
SYS_CONF_DIR := /etc
|
|
|
|
PROFILE_DIR := $(SYS_CONF_DIR)/profile.d
|
|
|
|
SUDOERS_DIR := $(SYS_CONF_DIR)/sudoers.d
|
|
|
|
D += /
|
2013-02-06 13:50:11 +01:00
|
|
|
|
|
|
|
all: truckle
|
|
|
|
@echo 'Nothing to do :)'
|
2013-02-15 21:33:55 +01:00
|
|
|
@echo 'Please run "make install" to install.'
|
2013-02-06 13:50:11 +01:00
|
|
|
|
Logic moved from truckle to cave.
truckle commands to cave added: `cave do`, `cave retry`, `cave upgrade`
You do not need truckle upgrade, now sudo cave upgrade works, too.
These commands do not depend on truckle, it works fine with cave-only.
Environment variables added via `/etc/profile.d/cave.sh`.
At the moment only resume-file-depended variables
(TRUCKLE_RESUME_FILE, CAVE_RESUME_OPTIONS, CAVE_RESOLVE_OPTIONS, ...)
If you use cave, the resume-file will be used automaticaly.
You do not need truckle anymore to have auto-resume-files.
But sudo will remove these from env...
Sudoers-config for cave added via `/etc/sudoers.d/cave`.
sudo will keep the same variables like defined in `/etc/profile.d/cave.sh`.
I do not know, but i think it can be a security hole.
But never allow users to use cave as root!
So, now you can use sudo, too.
These combinations of new cave-related changes will allow this:
sudo cave upgrade
sudo cave do
# something went wrong?
sudo cave retry
Only pagered it is easier with truckle:
sudo cave -cy upgrade | less -R
# vs.
truckle upgrade
2013-07-10 13:37:23 +02:00
|
|
|
install_truckle: truckle
|
2013-02-16 16:15:09 +01:00
|
|
|
mkdir -p $(D)$(BIN_PREFIX)
|
2013-02-06 13:50:11 +01:00
|
|
|
install -m 0755 truckle $(D)$(BIN_PREFIX)/truckle
|
|
|
|
for c in `./truckle --list-commands`; do ln -fs truckle $(D)$(BIN_PREFIX)/truckle-$${c} ; done
|
2013-02-17 14:58:58 +01:00
|
|
|
for c in trdo tresume tretry; do ln -fs truckle $(D)$(BIN_PREFIX)/$${c} ; done
|
2013-02-16 15:39:57 +01:00
|
|
|
|
Logic moved from truckle to cave.
truckle commands to cave added: `cave do`, `cave retry`, `cave upgrade`
You do not need truckle upgrade, now sudo cave upgrade works, too.
These commands do not depend on truckle, it works fine with cave-only.
Environment variables added via `/etc/profile.d/cave.sh`.
At the moment only resume-file-depended variables
(TRUCKLE_RESUME_FILE, CAVE_RESUME_OPTIONS, CAVE_RESOLVE_OPTIONS, ...)
If you use cave, the resume-file will be used automaticaly.
You do not need truckle anymore to have auto-resume-files.
But sudo will remove these from env...
Sudoers-config for cave added via `/etc/sudoers.d/cave`.
sudo will keep the same variables like defined in `/etc/profile.d/cave.sh`.
I do not know, but i think it can be a security hole.
But never allow users to use cave as root!
So, now you can use sudo, too.
These combinations of new cave-related changes will allow this:
sudo cave upgrade
sudo cave do
# something went wrong?
sudo cave retry
Only pagered it is easier with truckle:
sudo cave -cy upgrade | less -R
# vs.
truckle upgrade
2013-07-10 13:37:23 +02:00
|
|
|
install_cave_commands:
|
|
|
|
mkdir -p $(D)$(CAVE_COMMANDS_PREFIX)
|
|
|
|
install -m 0755 -o root -g root -t $(D)$(CAVE_COMMANDS_PREFIX) cave_commands/*
|
|
|
|
|
|
|
|
install_configs:
|
|
|
|
mkdir -p $(D)$(PROFILE_DIR) $(D)$(SUDOERS_DIR)
|
|
|
|
install -m 0644 -o root -g root configs/profile.sh $(D)$(PROFILE_DIR)/cave.sh
|
|
|
|
install -m 0440 -o root -g root configs/sudoers $(D)$(SUDOERS_DIR)/cave
|
|
|
|
|
|
|
|
install: install_truckle install_cave_commands install_configs
|
|
|
|
|
2013-02-16 15:39:57 +01:00
|
|
|
README.md: truckle README.pre.md
|
|
|
|
( cat README.pre.md ; ./truckle --help ) > README.md.tmp
|
|
|
|
mv README.md.tmp README.md
|
|
|
|
|
|
|
|
release: README.md
|