2021-03-14 15:38:19 +01:00
|
|
|
#!/bin/sh
|
2021-03-14 16:28:41 +01:00
|
|
|
|
|
|
|
DIRFILE="$HOME/.surf/lastsavedir"
|
|
|
|
|
|
|
|
lastdir=$(cat "$DIRFILE")
|
|
|
|
if [ -n "$lastdir" ]; then
|
|
|
|
cd "$lastdir"
|
|
|
|
fi
|
|
|
|
|
2021-03-14 16:18:16 +01:00
|
|
|
filename=$(basename -s ".html" "$1")
|
|
|
|
file=$(zenity --file-selection --save --filename="$filename.html")
|
2021-03-14 15:38:19 +01:00
|
|
|
if [ -n "$file" ]; then
|
|
|
|
cat > "$file"
|
2021-03-14 16:28:41 +01:00
|
|
|
dir=$(dirname "$file")
|
|
|
|
echo "$dir" > "$DIRFILE"
|
2021-03-14 15:38:19 +01:00
|
|
|
fi
|