Skip to content

Commit acda0f4

Browse files
sih4sing5hong5danpovey
authored andcommitted
[scripts] Small fix to utils/data/convert_data_dir_to_whole.sh (RE backups) (#2735)
1 parent ebbae44 commit acda0f4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

egs/wsj/s5/utils/data/convert_data_dir_to_whole.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,15 @@ if [ -f $data/reco2file_and_channel ]; then
3535
fi
3636

3737
mkdir -p $dir/.backup
38-
mv $dir/feats.scp $dir/cmvn.scp $dir/.backup
39-
40-
rm $dir/utt2spk || true
38+
if [ -f $dir/feats.scp ]; then
39+
mv $dir/feats.scp $dir/.backup
40+
fi
41+
if [ -f $dir/cmvn.scp ]; then
42+
mv $dir/cmvn.scp $dir/.backup
43+
fi
44+
if [ -f $dir/utt2spk ]; then
45+
mv $dir/utt2spk $dir/.backup
46+
fi
4147

4248
[ -f $data/stm ] && cp $data/stm $dir
4349
[ -f $data/glm ] && cp $data/glm $dir

0 commit comments

Comments
 (0)