diff --git a/README.md b/README.md index 42d739f..74e8920 100755 --- a/README.md +++ b/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 -> .daisy////. + 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. diff --git a/binbox b/binbox index ec1e474..e21843a 100755 --- a/binbox +++ b/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`. diff --git a/calm b/calm index 6e45689..a71eb09 100755 --- a/calm +++ b/calm @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Calm a process down # NEEDS_WORK: cleanup # calm == only one process diff --git a/cdz b/cdz index d39446b..20f2518 100755 --- a/cdz +++ b/cdz @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash if [[ $LD_INTERNAL -ne 1 ]]; then diff --git a/daisy.source b/daisy.source index ade487f..d5232a5 100755 --- a/daisy.source +++ b/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 \ No newline at end of file +fi diff --git a/editx b/editx index 276209f..0fab110 100755 --- a/editx +++ b/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. diff --git a/filewait b/filewait index af52929..a1c2f1f 100755 --- a/filewait +++ b/filewait @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # A simple utility that waits for a file to become available, infinitely LD_INTERNAL=1 diff --git a/newday b/newday index 6266505..3831a76 100755 --- a/newday +++ b/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: diff --git a/own b/own index 9d59e2c..6c12c91 100755 --- a/own +++ b/own @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Simple program that changes ownership to the current # user, recursively. diff --git a/sw b/sw index 8427de3..65db9fb 100755 --- a/sw +++ b/sw @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # It just swaps two files export LD_INTERNAL1 diff --git a/what b/what index 0bf8c12..9891243 100755 --- a/what +++ b/what @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Where is the binary? # Usage: what [] # Returns: