Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b86a4183f9 | ||
|
|
96cf21afb2 | ||
|
|
f2bcaf389e |
11 changed files with 14 additions and 16 deletions
16
Makefile
16
Makefile
|
|
@ -1,16 +0,0 @@
|
|||
PREFIX ?= /usr/local
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
SRCDIR ?= .
|
||||
|
||||
SCRIPTS := $(wildcard $(SRCDIR)/*.sh)
|
||||
|
||||
install:
|
||||
@mkdir -p $(BINDIR)
|
||||
for f in $(SCRIPTS); do \
|
||||
install -m 755 "$$f" "$(BINDIR)/$$(basename $$f .sh)"; \
|
||||
done
|
||||
|
||||
uninstall:
|
||||
for f in $(SCRIPTS); do \
|
||||
rm -f "$(BINDIR)/$$(basename $$f .sh)"; \
|
||||
done
|
||||
1
README.md
Normal file
1
README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Thing
|
||||
1
scripts/adpon.sh
Executable file
1
scripts/adpon.sh
Executable file
|
|
@ -0,0 +1 @@
|
|||
[ "$(cat /sys/class/power_supply/ADP*/online 2>/dev/null)" = "1" ] && echo "ADP Online" || echo "ADP Offline; using battery"
|
||||
12
scripts/ereport.sh
Executable file
12
scripts/ereport.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
DATE=$(date -I)
|
||||
REPORT_PATH=$HOME/ereport-$(date -I).txt
|
||||
if [[ -f "$REPORT_PATH" ]]; then
|
||||
echo "Today's report already exists at $REPORT_PATH!"
|
||||
else
|
||||
echo "Syncing repositories..."
|
||||
# sudo emerge --sync >> "$REPORT_PATH"
|
||||
echo "Writing update report..."
|
||||
sudo emerge --update --newuse --deep @world --pretend >> "$REPORT_PATH"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue