Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
05e9c9dd
Kaydet (Commit)
05e9c9dd
authored
Kas 30, 2008
tarafından
Matthias Klose
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
- Tools/faqwiz/move-faqwiz.sh: Fix unsecure use of temporary files
üst
1bd74dea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
move-faqwiz.sh
Tools/faqwiz/move-faqwiz.sh
+9
-3
No files found.
Tools/faqwiz/move-faqwiz.sh
Dosyayı görüntüle @
05e9c9dd
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
# blackjesus:~> ./move-faqwiz.sh 2\.1 3\.2
# blackjesus:~> ./move-faqwiz.sh 2\.1 3\.2
# Moving FAQ question 02.001 to 03.002
# Moving FAQ question 02.001 to 03.002
if
[
x
$2
=
=
x
]
;
then
if
[
x
$2
=
x
]
;
then
echo
"Need 2 args: original_version final_version."
echo
"Need 2 args: original_version final_version."
exit
2
exit
2
fi
fi
...
@@ -19,7 +19,7 @@ if [ ! -d data -o ! -d data/RCS ]; then
...
@@ -19,7 +19,7 @@ if [ ! -d data -o ! -d data/RCS ]; then
exit
2
exit
2
fi
fi
function
cut_n_pad
()
{
cut_n_pad
()
{
t
=
`
echo
$1
|
cut
-d
.
-f
$2
`
t
=
`
echo
$1
|
cut
-d
.
-f
$2
`
export
$3
=
`
echo
$t
|
awk
"{ tmp =
\\
$0
; l = length(tmp); for (i = 0; i <
$2
-l+1; i++) { tmp = "
0
".tmp } print tmp }"
`
export
$3
=
`
echo
$t
|
awk
"{ tmp =
\\
$0
; l = length(tmp); for (i = 0; i <
$2
-l+1; i++) { tmp = "
0
".tmp } print tmp }"
`
}
}
...
@@ -28,7 +28,13 @@ cut_n_pad $1 1 prefix1
...
@@ -28,7 +28,13 @@ cut_n_pad $1 1 prefix1
cut_n_pad
$1
2 suffix1
cut_n_pad
$1
2 suffix1
cut_n_pad
$2
1 prefix2
cut_n_pad
$2
1 prefix2
cut_n_pad
$2
2 suffix2
cut_n_pad
$2
2 suffix2
tmpfile
=
tmp
$RANDOM
.tmp
if
which tempfile
>
/dev/null
;
then
tmpfile
=
$(
tempfile
-d
.
)
elif
[
-n
"
$RANDOM
"
]
;
then
tmpfile
=
tmp
$RANDOM
.tmp
else
tmpfile
=
tmp
$$
.tmp
fi
file1
=
faq
$prefix1
.
$suffix1
.htp
file1
=
faq
$prefix1
.
$suffix1
.htp
file2
=
faq
$prefix2
.
$suffix2
.htp
file2
=
faq
$prefix2
.
$suffix2
.htp
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment