2018-02-03 02:29:33 +02:00
|
|
|
#
|
|
|
|
# Quick scratch directory creator
|
|
|
|
#
|
|
|
|
|
|
|
|
# Create quick scratch directory for testing and other stuff
|
|
|
|
function new-scratch {
|
|
|
|
local SCRATCH="${HOME}/scratch"
|
|
|
|
local NEW_SCRATCH="${HOME}/tmp/scratch_$(date "+%s")"
|
2018-02-03 03:03:25 +02:00
|
|
|
mkdir -p "${NEW_SCRATCH}"
|
2018-02-03 02:29:33 +02:00
|
|
|
ln -nfs "${NEW_SCRATCH}" "${SCRATCH}"
|
2018-02-03 03:03:25 +02:00
|
|
|
pushd "${SCRATCH}/" >/dev/null
|
2018-02-03 02:29:33 +02:00
|
|
|
printf "New scratch dir ready for grinding ;>\n\n"
|
|
|
|
}
|
|
|
|
|
|
|
|
autoload -Uz new-scratch
|