create files correctly
This commit is contained in:
parent
c5ac00781d
commit
2bcaa7e246
@ -3,10 +3,15 @@
|
|||||||
set -ex
|
set -ex
|
||||||
<"$0" python3 -c "import os, sys
|
<"$0" python3 -c "import os, sys
|
||||||
for day in sys.stdin.read().split('\n\n\n'):
|
for day in sys.stdin.read().split('\n\n\n'):
|
||||||
f = day.split('\n')[0]; if f[0] == '#': continue
|
f = day.split('\n')[0]
|
||||||
|
if f[0] != '/':
|
||||||
|
continue
|
||||||
|
f = '.' + f
|
||||||
d = '/'.join(f.split('/')[:-1])
|
d = '/'.join(f.split('/')[:-1])
|
||||||
if '/' in f and not(os.path.isdir(d)): os.makedirs(d)
|
if '/' in f and not(os.path.isdir(d)) and not(d == ''):
|
||||||
with open(f,'w') as fd: fd.write(day)"
|
os.makedirs(d)
|
||||||
|
with open(f,'w') as fd:
|
||||||
|
fd.write(day)"
|
||||||
test -f homepage.local \
|
test -f homepage.local \
|
||||||
&& exec ./homepage.local \
|
&& exec ./homepage.local \
|
||||||
|| exit 0
|
|| exit 0
|
||||||
@ -10216,3 +10221,7 @@ trust them a bit more than a bald guy on Spotify.
|
|||||||
|
|
||||||
Today's Juneteenth, which is a memory to a pretty cool event, the end
|
Today's Juneteenth, which is a memory to a pretty cool event, the end
|
||||||
of lawful slavery in the United States.
|
of lawful slavery in the United States.
|
||||||
|
|
||||||
|
/clean.sh
|
||||||
|
|
||||||
|
# cleanup script
|
||||||
|
Loading…
Reference in New Issue
Block a user