-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_init_app
More file actions
executable file
·39 lines (25 loc) · 794 Bytes
/
Copy path_init_app
File metadata and controls
executable file
·39 lines (25 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh -e
sudo -v
cd "$(dirname "$0")"
ROOT_PATH=$(pwd -P)
# 初始化项目
# 创建文件夹
mkdir -vp /Applications/_Apps
#for src in $(find "$ROOT_PATH" -maxdepth 2 -name '*.app' -not -path '*.git*')
# do
# DESTINATION_PATH="/Applications/apps/"$(basename "${src%.*}").app
# SOURCE_PATH=$src
# echo $DESTINATION_PATH
# echo $SOURCE_PATH
# #link_data_file "$SOURCE_PATH" "$DESTINATION_PATH"
#done
for element in `find "$ROOT_PATH" -maxdepth 2 -name '*.app' -not -path '*.git*' | tr " " "\?"`
do
element=`tr "\?" " " <<<$element`
apps="$element"
SOURCE_PATH="$apps"
DESTINATION_PATH="/Applications/_Apps/"$(basename "${apps%.*}").app
echo $DESTINATION_PATH
echo $SOURCE_PATH
link_data_file "$SOURCE_PATH" "$DESTINATION_PATH"
done