fixed touch on BSD utils
This commit is contained in:
parent
45dee25b3d
commit
2a02c34429
1 changed files with 3 additions and 2 deletions
3
bb.sh
3
bb.sh
|
@ -349,6 +349,7 @@ get_html_file_content() {
|
|||
edit() {
|
||||
# Original post timestamp
|
||||
edit_timestamp="$(LC_ALL=$date_locale date -r $1 +"%a, %d %b %Y %H:%M:%S %z" )"
|
||||
touch_timestamp="$(LC_ALL=$date_locale date -r $1 +'%Y%m%d%H%M')"
|
||||
if [ "$2" = "full" ]; then
|
||||
$EDITOR "$1"
|
||||
filename="$1"
|
||||
|
@ -368,7 +369,7 @@ edit() {
|
|||
filename="$1"
|
||||
fi
|
||||
fi
|
||||
touch -d "$edit_timestamp" "$filename"
|
||||
touch -t "$touch_timestamp" "$filename"
|
||||
chmod 644 "$filename"
|
||||
echo "Posted $filename"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue