shoestrap/assets/default/bin/bak

12 lines
120 B
Bash
Executable File

#! /bin/bash
f="$1"
ext="${f##*.}"
if [[ "$ext" == "bak" ]]; then
cp $f "${f%.*}"
else
cp "$f" "${f}.bak"
fi