File tree Expand file tree Collapse file tree 2 files changed +24
-20
lines changed Expand file tree Collapse file tree 2 files changed +24
-20
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/zsh
2
+
3
+ # Copy one folder to another, renaming all files inside to match
4
+ # Useful for weekly reports, where the folder and the files inside
5
+ # (all the many latex files) include the date
6
+
7
+ set -e
8
+
9
+ src=$1
10
+ dst=$2
11
+
12
+ if [ -z $dst ]; then
13
+ echo " No destination"
14
+ return 1
15
+ fi
16
+ if [ -e $dst ]; then
17
+ echo " Destination already exists"
18
+ return 1
19
+ fi
20
+ cp -r $src $dst
21
+ cd $dst
22
+ # echo "rename $(basename $src) $(basename $dst) *"
23
+ # rename $(basename $src) $(basename $dst) *
24
+ rename " s/$( basename $src ) /$( basename $dst ) /" *
Original file line number Diff line number Diff line change @@ -94,26 +94,6 @@ function yay() {
94
94
command yay " $@ "
95
95
}
96
96
97
- # Copy one folder to another, renaming all files inside to match
98
- # Useful for weekly reports, where the folder and the files inside
99
- # (all the many latex files) include the date
100
- function plagiarise() {
101
-
102
- src=$( basename $1 )
103
- dst=$( basename $2 )
104
-
105
- if [ -z $dst ]; then
106
- echo " No destination"
107
- return 1
108
- fi
109
- if [ -e $dst ]; then
110
- echo " Destination already exists"
111
- return 1
112
- fi
113
- cp -r $src $dst
114
- cd $dst
115
- rename $src $dst *
116
- }
117
97
function poster() {
118
98
ffmpeg -i $1 -r 1 -f image2 $2
119
99
}
You can’t perform that action at this time.
0 commit comments