Change all scripts to use the BASH interpreter, as some SH versions do not
handle a lot of things correctly.
This commit is contained in:
parent
e3a2efdb43
commit
33ca0e1422
11 changed files with 30 additions and 16 deletions
17
README.md
17
README.md
|
|
@ -1,4 +1,6 @@
|
|||
---*This project is still under heavy development!*---
|
||||
Please do not delete this file, as it is used to display help information.
|
||||
|
||||
# L A C K A D A I S I C A L
|
||||
A collection of easy-to-understand, easy-to-use scripts, functions and aliases. Designed to be beginner-friendly but also useful!
|
||||
|
||||
|
|
@ -54,11 +56,16 @@ These are the included binaries and utilities:
|
|||
tool quits and simply returns the filename. This
|
||||
can be used in personal workflows to stall a longer
|
||||
command that relies on the existence of said file.
|
||||
- newday:
|
||||
A basic but powerful journaling system. Recommended
|
||||
to be set up via crontab. Can be used for everything
|
||||
from diaries to general file storage to even BTRFS
|
||||
snapshots.
|
||||
- agenda:
|
||||
Sets up a folder that is backed by a date-based tree
|
||||
directory structure. Requires an argument for the name
|
||||
of the folder to generate. Generates a symlink in this
|
||||
name to a date sub-folder in a local '.daisy' folder.
|
||||
Format is <dir> -> .daisy/<dir>/<year>/<month>/<day>.
|
||||
Recommended to run via crontab - automatically cleans
|
||||
up empty folders.
|
||||
Can be used for everything you'd like to sort by date.
|
||||
For example; a diary, browser downloads, backups, code.
|
||||
- own:
|
||||
A simple utility. It's effectively an alias for
|
||||
"sudo chown -R user:user" on the target dir/file.
|
||||
|
|
|
|||
2
binbox
2
binbox
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# binbox: Creates a multi-binary script that self-contains the input scripts.
|
||||
# Symlinking to the resulting binary with the name of one of the original scripts will trigger
|
||||
# said script. The idea is similar to `busybox`.
|
||||
|
|
|
|||
2
calm
2
calm
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Calm a process down
|
||||
# NEEDS_WORK: cleanup
|
||||
# calm <pid> == only one process
|
||||
|
|
|
|||
2
cdz
2
cdz
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $LD_INTERNAL -ne 1 ]];
|
||||
then
|
||||
|
|
|
|||
11
daisy.source
11
daisy.source
|
|
@ -27,8 +27,15 @@ fi
|
|||
# Check for dependencies
|
||||
function daisy_dependency_check
|
||||
{
|
||||
command -v $1 1>/dev/null 2>/dev/null;
|
||||
BIN=$(command -v $1 2>/dev/null)
|
||||
res=$?
|
||||
|
||||
BIN=$(basename $BIN 2>/dev/null)
|
||||
|
||||
if [[ $BIN == $1 ]]; then
|
||||
res=1
|
||||
fi
|
||||
|
||||
echo $(($res ^ 1))
|
||||
}
|
||||
|
||||
|
|
@ -494,4 +501,4 @@ then
|
|||
unset LD_HAS_peco
|
||||
unset LD_HAS_md5sum
|
||||
unset LD_HAS_tree
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
2
editx
2
editx
|
|
@ -1,4 +1,4 @@
|
|||
# !/bin/sh
|
||||
# !/bin/bash
|
||||
# This utility pre-allocs a file and adds execution permissions. It also
|
||||
# removes the resulting file if it is empty after the editor closes.
|
||||
|
||||
|
|
|
|||
2
filewait
2
filewait
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# A simple utility that waits for a file to become available, infinitely
|
||||
|
||||
LD_INTERNAL=1
|
||||
|
|
|
|||
2
newday
2
newday
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# This script is intended to be run via cron.
|
||||
|
||||
# It creates a folder structure in home for the current date in the following format:
|
||||
|
|
|
|||
2
own
2
own
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Simple program that changes ownership to the current
|
||||
# user, recursively.
|
||||
|
||||
|
|
|
|||
2
sw
2
sw
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# It just swaps two files
|
||||
|
||||
export LD_INTERNAL1
|
||||
|
|
|
|||
2
what
2
what
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Where is the binary?
|
||||
# Usage: what [<keyword>]
|
||||
# Returns:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue