linkdata2sd  Check-in [928fd577fa]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:agrega opcion forget
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:928fd577fa21e7aac945c371179c463ed2615a9c
User & Date: brau 2016-03-21 00:20:27
Context
2016-03-21
00:21
show snapshot disk usage check-in: 9bd032be5b user: brau tags: trunk
00:20
agrega opcion forget check-in: 928fd577fa user: brau tags: trunk
00:15
refactoriza y agrega modo recover. Detecta enlace roto check-in: c972a7703c user: brau tags: trunk
Changes

Changes to linksd.sh.

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
...
180
181
182
183
184
185
186





187
188
189
190
191
192
193

	cd `dirname $dest_dir`
	dir=`basename $dest_dir`
	# determina usage y detecta enlaces rotos
	usage=`(du -sh "$dest_dir" || echo broken) | cut -f1`

	(cd $vers_dir && ls_vs $vers)
	echo -n "$1 [$usage, sd] (unlink/delete/sh/VERSION/snap/ren): "
	read r                                                        
	case "$r" in                                                  
		unlink)                                                 
			rm "$DATADIR/$1" ||
				error error al intentar eliminar enlace
			dolink "$dir" "$DATADIR"
			ui_phone_to_sd "$@"
................................................................................
			;;
		delete)                                                  
			rm "$DATADIR/$1" ||
				error error al intentar eliminar enlace
			deltree "$dir"
			msg "directorio data/ de $1 eliminado"
			;;





		snap)
			newvers="$vers"_"`now`"
			mkdir "$SDDIR" 2>/dev/null
			mkdir "$SDDIR/$1" 2>/dev/null
			mkdir "$SDDIR/$1/$newvers" ||
				error no se pudo crear nueva version en sd
			dolink "$1" "$SDDIR/$1/$newvers" snapshot







|







 







>
>
>
>
>







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
...
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

	cd `dirname $dest_dir`
	dir=`basename $dest_dir`
	# determina usage y detecta enlaces rotos
	usage=`(du -sh "$dest_dir" || echo broken) | cut -f1`

	(cd $vers_dir && ls_vs $vers)
	echo -n "$1 [$usage, sd] (unlink/delete/forget/sh/VERSION/snap/ren): "
	read r                                                        
	case "$r" in                                                  
		unlink)                                                 
			rm "$DATADIR/$1" ||
				error error al intentar eliminar enlace
			dolink "$dir" "$DATADIR"
			ui_phone_to_sd "$@"
................................................................................
			;;
		delete)                                                  
			rm "$DATADIR/$1" ||
				error error al intentar eliminar enlace
			deltree "$dir"
			msg "directorio data/ de $1 eliminado"
			;;
		forget)
			rm "$DATADIR/$1" ||
				error error al intentar eliminar enlace
			msg "enlace al snapshot eliminado"
			;;
		snap)
			newvers="$vers"_"`now`"
			mkdir "$SDDIR" 2>/dev/null
			mkdir "$SDDIR/$1" 2>/dev/null
			mkdir "$SDDIR/$1/$newvers" ||
				error no se pudo crear nueva version en sd
			dolink "$1" "$SDDIR/$1/$newvers" snapshot